The Plants API is a RESTful service designed to make illustrations of plants from old books available through the International Image Interoperability Framework (IIIF), leveraging the Invenio-IIIF library.
Note: This is a hobby project.
-
Search plants illustrations (
/plants): Users can access a list of available plants illustrations; -
IIIF Image Retrieval (
/iiif): Utilizes IIIF standards to serve images of plants, enabling rich interaction such as zooming and panning.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Git
- Make
- Docker and Docker Compose
To use the Plants API, first, you need to clone the repository:
git clone https://github.com/m3nin0-labs/plantsThen, navigate to the cloned directory:
cd plantsIn the repository directory, use make to configure it. To do this, you can start the containers:
make upThen, execute the database migrations:
make migrationsTo populate the database with example data, use:
make ingestOther options are available in the Makefile, including:
make up: Start the application and database using Docker and Docker-compose;make down: Stop and remove containers, networks, images, and volumes;make migrations: Run database migrations to prepare your environment;make ingest: Ingest example data into the database to start testing the API.
To develop the Plants API, first, you need to clone the repository:
git clone https://github.com/m3nin0-labs/plantsThen, access the cloned repository:
cd plantsYou can install the project using:
poetry installAfter install the project, you can create a database (PostgreSQL). Before execute the command below, make sure the database address in the settings.toml is correct:
FLASK_APP=plants/main.py flask db upgradeThen, you can execute the project:
FLASK_APP=plants/main.py flask runWe welcome contributions! If you have suggestions for improvements or bug fixes, please feel free to fork the repository and submit a pull request.
The example data available in this repository, comes from the Old Book Illustrations website. Thanks!
plants is distributed under the MIT license. See LICENSE for more details.