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 0.7
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-0.7.tar.gz | 22.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gisweb_tenants-0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 51.4 kB
Release files / gisweb_tenants-0.7.tar.gz
| Download URL | gisweb_tenants-0.7.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d911c753a78dcfa7b9d4056c6c40d35ebd6b17485d355cbc8cec1a0ff88c66bc
|
|
BLAKE2b-256 checksum How to use checksums |
5259e0a605bc7040d0546abfa8d95b48cba7e3650a1b6bcf7a13312b8381b699
|
| 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-137-generic
|
Release files / gisweb_tenants-0.7-py3-none-any.whl
| Download URL | gisweb_tenants-0.7-py3-none-any.whl |
|---|---|
| Size | 28.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
167047a4b84a5549fb7e0802fbb45eb5f4c82caf9a218491732c7d562505674d
|
|
BLAKE2b-256 checksum How to use checksums |
edc9b6018e08f3b6acc96934b95c7e2f21daf6aa0f757438a28f516507b802d7
|
| 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-137-generic
|