Skip to main content

An implementation of Microservice Chassis pattern in Python

Project description

MUMiChasPy

MuMiChasPy logo

Mondragon Unibertsitatea's Microservice Chassis pattern implementation in Python (MuMiChasPy).

Developers

Testing

  • Create virtual environment:
python -m venv env
source env/bin/activate
  • Install dependencies:
python -m pip install .[test]
  • Execute tests:
pytest

Style guide with flake8

pip install flake8 flake8-html
flake8 --max-line-length=100 --format=html --htmldir=flake-report **/*.py

Open flake-report/index.html with your browser.

Environment variables

See dot_env_example file.

SQLALCHEMY_DATABASE_URL

Used as the URL to connect to the database.

PUBLIC_KEY_FILE_PATH

File path where public key will be stored (or loaded if URL is not correctly working).

PUBLIC_KEY_URL

When system starts (or when update_public_key is executed), a REST call will be made to that URL to get the public key. If rest call is not successful, PUBLIC_KEY_FILE_PATH file will be loaded.

To force public key, we could for example:

from mumichaspy.fastapi_jwt_chassis.config import config
...
if config.public_key is None:
    config.update_public_key()

JWT_ISSUER

When validating a JWT, provided issuer (iss) will be checked.

JWT_ALGORITHM

The algorithm used for JWT validation (RS256 by default)

License

MIT license (see LICENSE), provided WITHOUT WARRANTY.

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

mumichaspy-1.0.6.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

mumichaspy-1.0.6-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file mumichaspy-1.0.6.tar.gz.

File metadata

  • Download URL: mumichaspy-1.0.6.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for mumichaspy-1.0.6.tar.gz
Algorithm Hash digest
SHA256 b97ee46fe5a042b4cc7def777990ccb0035add96344381e27bcd8ba97e582afa
MD5 ba973f6d177dad93b253332c07369426
BLAKE2b-256 b8aa7a478bd94f9802194687c2804cf61459567412197a6d37d573669e8f4a0f

See more details on using hashes here.

File details

Details for the file mumichaspy-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: mumichaspy-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for mumichaspy-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2d1aa5b23f1f7ec3ee85ee9bafb308fa69bc3cbc09c08994c1e1cbf944800898
MD5 0db40d4207e516ca4896428b76957ffc
BLAKE2b-256 f7d70a6ea4913ccb99c9954ac9a180bb5c330e96f63121818609ca134b412fac

See more details on using hashes here.

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