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.7.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mumichaspy-1.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 53a0076f8f509b23e6460a5137042f94d47c665b7f25d9020be5f4ab4d9680a0
MD5 524acc993bd57feaa4c865ba4c1b5eb4
BLAKE2b-256 33d9a51f12654a955829db759062634361a3400a94306b2ec2ea24262402e51f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mumichaspy-1.0.7-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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 f8ba64fffdb8b53c23d381c772d09f3d4f620f93c411a513fbad2e12cbf13214
MD5 2d6f5a30f05e66490280b6e896ffaf83
BLAKE2b-256 1a4e3c7a4db9bae96476daafcbf8f2edb99553f0cc6fff6ca378c8b8d57f695f

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