gisweb-tenants
Libreria Python per gestire configurazione multitenant in applicazioni FastAPI.
Obiettivo
Separare:
- configurazione pubblica per tenant
- configurazione sensibile per tenant (Docker secrets)
e restituire un unico oggetto validato e tipizzato.
Convenzioni
Config pubblica
Directory configurabile, ad esempio:
./config/tenant_rapallo.json
Example Package
This is a simple example package. You can use to write your content.
poetry update poetry build poetry publish
casini venv per attivare quello giusto: source $(poetry env info --path)/bin/activate
poetry env info -p
rm -rf poetry env info -p
poetry env use python
Esempio:
{
"tenant": "rapallo",
"comune": {
"nome": "Comune di Rapallo"
},
"db": {},
"keycloak": {
"realm": "rapallo",
"client_id": "backend"
},
"paths": {
"upload_dir": "/data/rapallo/uploads",
"template_dir": "/data/rapallo/templates"
}
}
Metadata
Release files for gisweb-tenants 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gisweb_tenants-1.2.0.tar.gz | 24.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gisweb_tenants-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 54.7 kB
Release files / gisweb_tenants-1.2.0.tar.gz
| Download URL | gisweb_tenants-1.2.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d43e90a57f3f3af37ccf16c07d24c08e712d44973c20882ce62a32c29002e0e8
|
|
BLAKE2b-256 checksum How to use checksums |
578a8ec5470a17d2e4801ed67b1bab614e0a451afae15f53d509c32a4902346c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-139-generic
|
Release files / gisweb_tenants-1.2.0-py3-none-any.whl
| Download URL | gisweb_tenants-1.2.0-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9dc6a2e150653b80cc8375a95361e621abde3d9d6aef878b035d4f0e1a86c692
|
|
BLAKE2b-256 checksum How to use checksums |
e45222d16fc2b979c441dbd8c0ab209796174918147c6ea532819d91e2a1d14a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-139-generic
|