An implementation of Microservice Chassis pattern in Python
Project description
MUMiChasPy
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file mumichaspy-1.0.3.tar.gz
.
File metadata
- Download URL: mumichaspy-1.0.3.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b409f5a7ca48a73a36427c6cd9fae078ffac7b61bb84bc17258589bc8cb778c2 |
|
MD5 | 55e74caa9bc892e9b796009bbb2d8fb8 |
|
BLAKE2b-256 | 37a9b5b18d2739cad7ccae723fee9371191db7c2f423bd6211557bf4217d12b5 |
File details
Details for the file mumichaspy-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: mumichaspy-1.0.3-py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d110a126ba4437a8466199a6b19a1912717038efbecaaad1db004f0b00bdcdb9 |
|
MD5 | ba47ea23be2951867b40f82e93be3bfc |
|
BLAKE2b-256 | ee56251a69a80849d0ccbee104a5fc614e0c5396839fc5844487c5cecb917e87 |