Skip to main content

Gestione multi tenant

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.2.0.tar.gz (6.9 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.2.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gisweb_tenants-0.2.0.tar.gz
Algorithm Hash digest
SHA256 48798dac661492e3f1e4516dd6f51dab0ca9021ee442ca7c9c4f691cbb7251b7
MD5 814c46eda7155c55ad0d0955717be580
BLAKE2b-256 7f3534702fc0a8f1cadc70ea1c44e09e064876d7e626588512a03c7ecea7e9e7

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for gisweb_tenants-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1bcfe8bf9c4173e3c8b7e09b0111a01c1c6df8892a25cb737c8b5b311194fa23
MD5 6883c708861afbd2e2e742d7959e82f1
BLAKE2b-256 2a0c30070767b62422e53870bd4289100e3c4555e7b51bc011b9ba345ab3c140

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