Skip to main content

A simple flask library for building microservices with RBAC JWT security, OpenAPI client and SQLAlchemy database support.

Project description

Build PyPI Codecov pre-commit

A simple flask library for building microservices with RBAC JWT security, OpenAPI client and SQLAlchemy database support.

Developer Quick Start Guide

Follow the instructions below to get a development environment up and running quickly!

Prerequisites

Getting Help with Make Tasks

Execute the following command to get a full list of make targets:

$ make help

Setup Python Development Environment

  1. Create a Python virtual environment:

    $ mkvirtualenv -p py310 flask-ligand
  2. Setup develop environment:

    $ make develop-venv
  3. Setup git pre-commit hooks:

    $ make setup-pre-commit
  4. Verify that environment is ready for development:

    $ make test-all

Configuration Settings

The following environment variables are available to configure behavior of services that use this library:

Environment Variable Settings

ENV

Default Value for ‘local’ Environment

Description

SERVICE_PUBLIC_URL

http://localhost:5000

The public URL for this service. (Used for generating OpenAPI clients)

SERVICE_PRIVATE_URL

http://localhost:5000

The private URL for this service. (Used for generating OpenAPI clients)

OIDC_ISSUER_URL

None (must be provided)

The Keycloak IAM URL to use for authentication.

OIDC_REALM

None (must be provided)

The Keycloak IAM realm to use for authentication.

SQLALCHEMY_DATABASE_URI

sqlite:///:memory:

The URI for a PostgreSQL database to use for persistent storage.

OPENAPI_GEN_SERVER_URL

http://api.openapi-generator.tech

The OpenAPI online generator server URL to use for creating clients.

Contributing

See CONTRIBUTING.rst for more details on developing for the flask-ligand project.

Release Process

See release_process.rst for information on the release process for the flask-ligand project.

Python Black IDE Integration

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask-ligand-0.1.2.tar.gz (40.8 kB view hashes)

Uploaded Source

Built Distribution

flask_ligand-0.1.2-py2.py3-none-any.whl (17.2 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page