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.0.tar.gz
.
File metadata
- Download URL: mumichaspy-1.0.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25729302126ee1b0fdf1e64e1a35c6cc5eb48e8d10da9ff34e9e8bb7aa864e4b |
|
MD5 | 82f4ae1fe29547737b997c0c04df38dc |
|
BLAKE2b-256 | d7d1f6a15182ad066dc13b8432df1a8594597b84a90c6e9580121290f3d32044 |
File details
Details for the file mumichaspy-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: mumichaspy-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06a47ab45d199a6323c5e89cb8bf4eeb795c6979c839641afe581214e76f7f5d |
|
MD5 | 1121b14a4ff83dcfc77dd6680608eeb4 |
|
BLAKE2b-256 | 3ec06a080b099b8f397c7c60f21cebeffe72df52d9158c876788fb60824fe7a5 |