Skip to main content

Django multi-tenancy through Postgres schemas

Project description

django-pgschemas

Packaging: poetry Build status Documentation status Code coverage PyPi version Downloads

This package uses Postgres schemas to support data multi-tenancy in a single Django project. It is a fork of django-tenants with some conceptual changes:

  • There are static tenants and dynamic tenants. Static tenants can have their own apps and urlconf.
  • Tenants can be routed via:
    • URL using subdomain or subfolder on shared subdomain
    • Session
    • Headers
  • Public schema should not be used for storing the main site data, but the true shared data across all tenants. Table "overriding" via search path is not encouraged.
  • Management commands can be run on multiple schemas via wildcards, either sequentially or in parallel using multithreading.

Documentation

https://django-pgschemas.readthedocs.io/

Version 1.0 has several breaking changes from the 0.* series. Please refer to this discussion for details and bug reports.

Contributing

  • Join the discussion at https://github.com/lorinkoz/django-pgschemas/discussions.
  • PRs are welcome! If you have questions or comments, please use the discussions link above.
  • To run the test suite run make or make coverage. The tests for this project live inside a small django project called sandbox.

Credits

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

django_pgschemas-1.0.0.tar.gz (65.2 kB view details)

Uploaded Source

Built Distribution

django_pgschemas-1.0.0-py3-none-any.whl (72.4 kB view details)

Uploaded Python 3

File details

Details for the file django_pgschemas-1.0.0.tar.gz.

File metadata

  • Download URL: django_pgschemas-1.0.0.tar.gz
  • Upload date:
  • Size: 65.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for django_pgschemas-1.0.0.tar.gz
Algorithm Hash digest
SHA256 446c82367780be4dd0c2decf7e77c5483f222f76435ee8351020503ea4d99759
MD5 bbfe85d1086ad97873bb56246197d0cb
BLAKE2b-256 7db5927811fcdbaff631a09d77200251e4549e0b12c495b9c138f9ce03f3f743

See more details on using hashes here.

File details

Details for the file django_pgschemas-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for django_pgschemas-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ba31cea09e8fb01c5d232d6114a081939f7bb0baeae4a3d443b8731f766132d
MD5 26eef67421b9011a54d4e358b6ab8d37
BLAKE2b-256 2325d1d2fd5ed3ca39550073cadd4534f66d56cbbf4ad2a3d2099a5786305a01

See more details on using hashes here.

Supported by

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