Skip to main content

Gestione multi tenant db e oidc

Project description

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"
  }
}

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

gisweb_tenants-0.4.8.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gisweb_tenants-0.4.8-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file gisweb_tenants-0.4.8.tar.gz.

File metadata

  • Download URL: gisweb_tenants-0.4.8.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-117-generic

File hashes

Hashes for gisweb_tenants-0.4.8.tar.gz
Algorithm Hash digest
SHA256 c9c5645cd01c367ffb040733a5323e881d75ac00f4ed1b0984ff1830c91e0aef
MD5 71e2583427ec81283ce2eff1dca7fb55
BLAKE2b-256 f3223aff2bcb178c27aae2f626e5e99128fdea89409720f02be3829accef4f6c

See more details on using hashes here.

File details

Details for the file gisweb_tenants-0.4.8-py3-none-any.whl.

File metadata

  • Download URL: gisweb_tenants-0.4.8-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.10.12 Linux/6.8.0-117-generic

File hashes

Hashes for gisweb_tenants-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 0865f1aa8ad7468fbd9da99dc1e5e6fd7a300266c9ef923ae4db25ca45633db8
MD5 fff79b6c7f620f2b2c6e39446423a86b
BLAKE2b-256 5b10042428575d6d7be0e3f9f48b2d7a27c1b81e2d996c0ee7ca7f3fa55a88b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page