Follow the instructions below to get a flask-ligand
development environment up and running quickly!
- Python 3.10+
- virtualenvwrapper
- Docker (with Compose V2)
Execute the following command to get a full list of make
targets:
$ make help
Create a Python virtual environment:
$ mkvirtualenv -p py310 flask-ligand
Setup develop environment:
$ make develop-venv
Setup git pre-commit hooks:
$ make setup-pre-commit
Verify that environment is ready for development:
$ make test-tox
The following environment variables are available to configure behavior of services that use this library when utilizing the built-in 'local' and 'dev' and 'prod' Flask environments. (See flask_environments.rst for more details about the available built-in Flask environments)
(Note: this project does support the use of '.env' files for loading environment variables)
ENV | Default Value for 'local' Flask Environment | Description |
---|---|---|
SERVICE_PUBLIC_URL |
http://localhost:5000 |
The public URL for this service. (Also used for generating OpenAPI clients) |
SERVICE_PRIVATE_URL |
http://localhost:5000 |
The private URL for this service. (Also used for generating OpenAPI clients) |
ALLOWED_ROLES |
user,admin |
A comma separated list of user roles that are allowed for endpoint protection. (e.g. 'user,admin') |
OIDC_DISCOVERY_URL |
Not set (must be provided) | The OpenID Connect Provider Configuration Request URL. |
SQLALCHEMY_DATABASE_URI |
sqlite:///:memory: |
The URI for a PostgreSQL database to use for persistent storage. (See database_configuration.rst for more information) |
OPENAPI_GEN_SERVER_URL |
http://api.openapi-generator.tech |
The OpenAPI online generator server URL to use for creating clients. |
This repo utilizes Python Black for automatic code formatting using the make format
task. However, this is not
very convenient to use on a regular basis and instead it is recommended to integrate Python Black into your IDE
workflow. Checkout these editor integration guides for integrating Python Black with popular IDEs and text
editors.
See integration_testing.rst for more details on how to setup and run the integration tests for the flask-ligand
project.
See CONTRIBUTING.rst for more details on developing for the flask-ligand
project.
See release_process.rst for information on the release process for the flask-ligand
project.