🏢 django-omnitenant

Production-Ready Multi-Tenancy for Django

Build scalable, multi-tenant SaaS applications with Django.
Flexible isolation strategies, automatic routing, and seamless integration.

⭐ Key Features

Powerful capabilities for building modern multi-tenant applications

🔐

Isolation Strategies

Database-per-tenant, schema-per-tenant, or cache-based isolation. Choose what works best for your use case.

Database Schema Cache
🛠️

Management Commands

CLI tools for creating tenants, running migrations, and managing domains.

CLI Migrations Automation
🔌

Integrations

Built-in support for Celery, Redis, Django REST Framework, and more.

Celery Redis DRF

Thread-Safe Context

Automatic tenant context management using contextvars. No manual passing of tenant IDs.

Context ThreadSafe Async
🎯

Smart Routing

Intelligent database and schema routing based on domain, subdomain, or custom resolvers.

Router Domain Resolver
🧩

Extensible Architecture

Pluggable backends, resolvers, and middleware. Built to be customized for your needs.

Backend Plugin Custom
📦

Production Ready

Battle-tested multi-tenancy patterns used in production applications

🔄

Easy Migration

Gradually migrate single-tenant apps to multi-tenant architecture

📊

Full Django Support

Works with all Django versions and integrates seamlessly with existing projects

🤝

Active Community

Get support from a community of developers building multi-tenant apps