Contents

Chapter 1

Features

This chapter covers the core features and capabilities of Tenant Manager.

Features

  • Tenant isolation — Thread-local context ensures requests never leak data between tenants
  • Context manager — with tenant_scope("tenant_id"): for scoped operations
  • Per-tenant config — Feature flags, user limits, storage limits, theming per tenant
  • Plan-based limits — Free/Starter/Pro/Enterprise tiers with auto-applied config
  • Data partitioning — All CRUD operations automatically scoped to current tenant
  • Member management — Add/remove users, role-based access (owner/admin/member/viewer)
  • Tenant lifecycle — Create, suspend, reactivate, upgrade plans
  • Admin operations — Cross-tenant queries and platform-wide statistics
  • JSON persistence — Save/load state for development

Requirements

  • Python 3.10+
  • No external dependencies (stdlib only)
Chapter 2

Quick Start

Follow this guide to get Tenant Manager up and running in your environment.

Quick Start

bash
python src/main.py --init-demo
bash
# List tenants
curl http://localhost:8004/api/tenants

# Create a tenant
curl -X POST http://localhost:8004/api/tenants \
  -H "Content-Type: application/json" \
  -d '{"name": "My Company", "slug": "my-company", "owner_id": "user_1", "plan": "pro"}'

# Add a member
curl -X POST http://localhost:8004/api/tenants/<id>/members \
  -H "Content-Type: application/json" \
  -d '{"user_id": "user_2", "role": "admin"}'

# Platform stats
curl http://localhost:8004/api/admin/stats

API Endpoints

MethodPathDescription
GET/api/tenantsList all tenants
POST/api/tenantsCreate a new tenant
GET/api/tenants/:idGet tenant details + members
POST/api/tenants/:id/membersAdd a member
POST/api/tenants/:id/upgradeUpgrade tenant plan
GET/api/admin/statsPlatform-wide statistics
Chapter 3
🔒 Available in full product

Project Structure

You’ve reached the end of the free preview

Get the full Tenant Manager and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $29 →
📦 Free sample included — download another copy for the full product.
Tenant Manager v1.0.0 — Free Preview