Skip to main content

TamilPY

PyPI version Python versions License: MIT

Schema-driven Python web framework — define models in schema.tpy, generate a production-ready FastAPI stack, and ship.

Built by Selvaganapathi Arumugam.

Documentation · PyPI · Requires Python 3.12+


Why "tamilPY"?

The name is a nod to my mother tongue, Tamil — a small personal tribute from the author. The framework itself isn't Tamil-specific in any way; it's a general-purpose, schema-driven Python web framework built for any project, any language, any team.


Table of contents


Features

  • Schema-first development — one schema.tpy drives models, migrations, repositories, services, controllers, and routes
  • Studio — visual local builder (tpy studio) for schema, database, auth, and build/migrate/seed
  • Starter templatescrm, institute-admin, inventory, helpdesk, blog-cms via tpy new --template
  • Incremental maketpy make:model / make:controller / make:service without a full rebuild
  • Multi-database — SQLite, PostgreSQL, MySQL, and MongoDB
  • Full CRUD generation — FastAPI layers from a single build step
  • Query Builder & relationships — fluent queries, schema relations { }, eager loading
  • Events, queues & scheduler — sync event bus, background jobs, cron-style schedule
  • Cache, validation & API envelopes — memory/file/Redis, pipe rules, ApiResponse
  • Kernel platform — Application providers/plugins, middleware groups, health & lifecycle
  • Logging, config & storage — log channels, config cache, file storage, route cache
  • DX tooling — schema validator with line numbers, generated-file markers, tpy optimize, tpy watch
  • Admin dashboard — optional Vite + React UI with per-template themes
  • CLI workflow — scaffolding, migrations, seeds, queue/schedule/cache, and local server

Full docs: TamilPY Docs


How it compares

Criteria Django Flask FastAPI (plain) tamilPY
Development speed ⭐⭐⭐ ⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐⭐
Learning curve ⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐ ⭐⭐⭐⭐⭐
Boilerplate code High Very high (build it yourself) Moderate (routes/schemas written by hand) Very low (schema-generated)
Code generation ✅ Full stack (models → routes → admin)
Database support PostgreSQL, MySQL, SQLite, Oracle Any (via extensions, e.g. SQLAlchemy) Any (via extensions, e.g. SQLAlchemy, Tortoise) SQLite, PostgreSQL, MySQL, MongoDB
REST API Requires DRF Manual ✅ Native ✅ FastAPI native
Async Limited ✅ Native ✅ Native
Type safety Optional Optional ✅ Pydantic ✅ Pydantic-enforced
Admin dashboard ✅ Built-in ✅ Generated (Vite + React)
CRUD development ⭐⭐⭐ ⭐⭐ ⭐⭐⭐ ⭐⭐⭐⭐⭐
Time to MVP Days / weeks Weeks Days Hours to a few days

Ratings reflect typical experience for standard CRUD/API-driven projects; results vary by team familiarity and project scope.


Installation

pip install tamilPY

Database drivers are optional extras:

pip install "tamilPY[postgres]"
pip install "tamilPY[mysql]"
pip install "tamilPY[mongodb]"
pip install "tamilPY[redis]"
pip install "tamilPY[all]"

SQLite works with the base install (stdlib).

Verify the install:

python -m tpy.cli version

Quick start

tpy new myapp
# or: tpy new myapp --template crm
cd myapp

Edit schema.tpy (or use Studio), then:

tpy studio         # optional visual builder at http://127.0.0.1:4200
tpy build          # configure database + generate application layers
tpy migrate        # apply migrations
tpy seed           # optional sample data
tpy serve          # start the API at http://127.0.0.1:8000

Generate the admin UI (optional):

tpy admin          # or: tpy build --with-ui
cd admin && npm install && npm run dev

Admin UI: http://127.0.0.1:5173

JWT auth (optional)

tpy auth
pip install -r requirements.txt
tpy migrate
tpy seed
tpy serve
tpy admin   # refresh UI with login page

Default super-admin: admin@example.com / admin123

Roles: super-admin, admin, developer — dashboard allows super-admin and developer only.

API: POST /auth/register, /auth/login, /auth/refresh, /auth/logout, GET /auth/me


Studio

Local visual builder for schema.tpy — no CDN, no separate npm install for end users.

cd myapp
tpy studio                 # http://127.0.0.1:4200
tpy studio --port 5000
tpy studio --no-open
tpy studio --host 0.0.0.0  # opt-in; prints a security warning

Screens: Model Designer, Relations canvas, Database panel, Auth (sidecar .tpy/studio.json), Diff preview before save, Build console (SSE), API Explorer, Templates.

Guide: Studio docs


Starter templates

tpy templates list
tpy new myschool --template institute-admin
tpy templates show crm
Template Focus
crm Company, Contact, Deal, Activity
institute-admin Students, courses, fees, exams
inventory Products, warehouses, POs, stock
helpdesk Tickets, agents, SLAs, comments
blog-cms Posts, authors, tags, categories

Each ships schema.tpy, admin-theme.json, sample seeds, and README notes. Admin themes apply via admin-theme.json or tpy admin --template <name>.

Guide: Templates docs

Incremental make

tpy make:model Invoice --fields "amount:float,status:enum(draft,paid),user_id:uuid references User"
tpy make:controller Invoice
tpy make:service Invoice
# --force required if a generated file was edited by hand

Guide: Make commands


CLI reference

Command Description
tpy new <name> Create a new project
tpy new <name> --template <t> Scaffold with a starter schema (crm, institute-admin, …)
tpy templates list / show List or print a starter template schema
tpy studio Local visual schema builder (http://127.0.0.1:4200)
tpy build Interactive database setup and code generation
tpy build --skip-db Generate using an existing .env
tpy build --with-ui Generate app layers and the React admin dashboard
tpy make:model Append a model to schema.tpy and generate only its layers
tpy make:controller / make:service Regenerate one layer for an existing model
tpy crud Regenerate CRUD layers from schema.tpy
tpy admin Generate a Vite + React admin dashboard
tpy admin --template <t> Apply starter admin theme tokens
tpy auth Enable JWT auth (login/register/refresh/logout), AuthRole + User, role seeds
tpy db configure Re-run the database configuration wizard
tpy migrate Create the database (if needed) and apply migrations
tpy migrate rollback Roll back the latest migration
tpy seed Run seed scripts in database/seeds
tpy queue table Create _tpy_jobs / failed-job tables
tpy queue work Run a queue worker (--driver database|sync|redis)
tpy schedule run Run due scheduled tasks
tpy schedule list List registered schedule events
tpy cache clear Flush file/memory/redis cache
tpy config show | cache | status | clear Inspect / cache configuration
tpy route cache | list | clear Cache and list HTTP routes
tpy optimize Cache config + routes for production
tpy watch Rebuild when schema.tpy changes
tpy about Framework + project environment
tpy commands List CLI commands
tpy serve Start the FastAPI development server
tpy doctor Validate project structure
tpy version / tpy -V Print the installed framework version

Schema language

database postgres

model User {
  id: uuid primary
  email: string unique required
}

model Post {
  id: uuid primary
  title: string required index
  body: string nullable
  user_id: uuid references User
  status: string default "draft"
  published: bool default false
  views: int default 0
}

Types

int · string · float · bool · uuid · datetime · enum(...) / enum Name

Field constraints

Constraint Effect
primary Primary key
required Required on create
unique Unique column constraint
nullable Allows NULL / optional values
index Secondary index (idx_<table>_<column>)
default <value> Column default (0, "draft", true / false)
references <Model> Foreign key (alias: foreign <Model>)
on_delete / on_update FK actions: cascade, set_null, restrict, no_action

Model-level composite unique:

unique(student_id, course_id)

Relationships (v0.1.9+)

model Post {
  id: uuid primary
  user_id: uuid references User
  relations {
    belongs_to User as author via user_id
    has_many Comment as comments
    belongs_to_many Tag as tags through PostTag
  }
}

Named / inline enums:

enum Status { draft published }
status: enum Status
kind: enum(a, b)

Foreign keys

user_id: uuid references User
author:  uuid references User.id

Compiles to REFERENCES "user" ("id"). Define referenced models before dependents so migrations run in order.

Defaults and indexes

  • Fields with default are optional in the generated create schema
  • index adds a secondary index; primary keys are indexed automatically

Database support

SQLite, PostgreSQL, MySQL, and MongoDB are supported for generated CRUD and migrations. SQL providers apply migrations as tables, columns, indexes, and foreign keys. MongoDB applies the same schema as collections and indexes; references are indexed metadata rather than enforced foreign-key constraints.


Admin dashboard

tpy admin generates a Vite + React app under admin/ from schema.tpy.

tpy serve          # terminal 1 — API
tpy admin          # generate UI (once, or after schema changes)
# themed: tpy admin --template crm
cd admin
npm install
npm run dev        # terminal 2 — UI

The wizard prompts for the API base URL (default: http://127.0.0.1:8000).

Path Role
src/data/models.js Model registry generated from schema.tpy
src/components/ Shared Layout, DataTable, RecordForm
src/pages/ Generic list and form pages

Re-running tpy admin refreshes generated files to match the current schema.

Note: The admin package.json uses @rollup/wasm-node so Vite works on Windows hosts where Application Control blocks Rollup's native binary.


Documentation

Full client & platform guide (GitHub Pages):

TamilPY Docs

In-page sections: Install · Features · Platform API · CLI

Feature cards open study guides with setup, how-it-works, examples, and common mistakes — for example:

Also:

Async / sync trade-off

Generated repositories and database providers are synchronous. FastAPI route handlers call sync provider methods directly. That keeps the stack simple and portable across SQLite / Postgres / MySQL / Mongo. For heavy IO under load, run workers behind a process manager or plan for future async providers; do not assume the generated DB layer is async-native today.


Contributing

See CONTRIBUTING.md and CODE_OF_CONDUCT.md.


License

MIT © Selvaganapathi Arumugam

Release files for tamilPY 0.1.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tamilPY 0.1.10
File Size Uploaded
tamilpy-0.1.10.tar.gz 194.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tamilPY 0.1.10
File Interpreter ABI Platform
tamilpy-0.1.10-py3-none-any.whl Python 3 none any Details

Total release size: 451.8 kB

Release files / tamilpy-0.1.10.tar.gz

Download URL tamilpy-0.1.10.tar.gz
Size 194.7 kB
Tags Source
SHA-256 checksum
How to use checksums
427f0e839e76dfcfe7a9608f4603814fccf7f3b2cffbc59c147c69c2d8895979
BLAKE2b-256 checksum
How to use checksums
efd80ad344430b52dacf86123353099217929c2ba39e2da543cfbf2976383842
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release files / tamilpy-0.1.10-py3-none-any.whl

Download URL tamilpy-0.1.10-py3-none-any.whl
Size 257.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8ea2bc95ad6e935f64c196165cd43480cf32829e2d5c7ccd32a613561a6b6566
BLAKE2b-256 checksum
How to use checksums
2659fa673a5d1f1bb1cb9425b9948cd601d6da713b0cc73bbc90bfa0278860a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.10 This release

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page