The Adele API
Adele application API (collaborative diplomatic edition) (Adele).
- Clone the GitHub repository in your projects' folder:
cd path/to/projects_folder/
git clone https://github.com/chartes/adele-app.git
-
Ensure you are running Python 3.12, for example with pyenv:
pyenv shell 3.12
-
Set up the virtual environment:
cd path/to/projects_folder/adele-app python -m venv your_venv_name source your_venv_name/bin/activate pip install -r requirements.txt -
For servers requiring uWSGI to run Python apps (remote Nginx servers):
- check if uWSGI is installed
pip list --local - install it in your virtual your_venv_name if it's not:
pip install uwsgi. The WSGI application is located atflask_app:flask_appNB : this command may require wheel:- to check whether wheel is installed:
pip show wheel - to install it if required:
pip install wheel
- to check whether wheel is installed:
- check if uWSGI is installed
- Fetch the latest database
- Create the /db folder as path/to/adele-app/db
- Copy the database with appropriate rights to this /db folder
⚠️ Below commands are mainly for local launch. For servers, apps may be started via processes management tools, refer to the servers documentation
- Reactivate the virtual environment if needed (
source your_venv_name/bin/activate) - Launch:
from the subfolder containing flask_app.py (
cd path/to/adele-app)python flask_app.py (--config=local/staging/prod/test) - Then visit http://localhost:5000/api/1.0/languages to test it is running
Additional details for offline commands:
python3 manage.py --help
Usage: manage.py [OPTIONS] COMMAND [ARGS]...
Options:
--config [local|staging|prod|test] select appropriate .env file to use
[default: staging]
--help Show this message and exit.
Commands:
db-create Create the database
db-recreate Recreate the database
load-fixtures Load test fixtures
add-manifest Add a IIIF manifest
add-user Add a new database user