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
  • 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 toolingtpy optimize, richer CLI (-V, about), tpy watch
  • Admin dashboard — optional Vite + React UI generated from the same schema
  • 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
cd myapp

Edit schema.tpy, then:

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


CLI reference

Command Description
tpy new <name> Create a new project
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 crud Regenerate CRUD layers from schema.tpy
tpy admin Generate a Vite + React admin dashboard
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)
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.9

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.9
File Size Uploaded
tamilpy-0.1.9.tar.gz 116.0 kB Details

Built distribution (wheel)

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

Total release size: 286.1 kB

Release files / tamilpy-0.1.9.tar.gz

Download URL tamilpy-0.1.9.tar.gz
Size 116.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2fc70dd30df0e9054cb9af7bc5eee36bfbd518911e0fe7fbd1bd6101c56b34aa
BLAKE2b-256 checksum
How to use checksums
5d7959131c372b8312247d44a83981e97890178a6f9b9ec4060a94d8bda82bf7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 29, 2026.

Transparency log

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

Download URL tamilpy-0.1.9-py3-none-any.whl
Size 170.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd28c00fe5769c3fdeda8946c9fd627003925d42d1723cb4bb5666b02247d392
BLAKE2b-256 checksum
How to use checksums
c78bcf69433d813f03396f3ba756e5a4119b8e5f06e99c22c76983b7ec0f894a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 29, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.10

2 release files

This release

0.1.9 This release

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