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
  • Admin dashboard — optional Vite + React UI generated from the same schema
  • CLI workflow — project scaffolding, migrations, seeds, and local server in one tool

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[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 serve Start the FastAPI development server
tpy doctor Validate project structure
tpy version 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)

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 guide: TamilPY Docs

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.8

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.8
File Size Uploaded
tamilpy-0.1.8.tar.gz 66.9 kB Details

Built distribution (wheel)

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

Total release size: 164.7 kB

Release files / tamilpy-0.1.8.tar.gz

Download URL tamilpy-0.1.8.tar.gz
Size 66.9 kB
Tags Source
SHA-256 checksum
How to use checksums
720e56f7054dccfc03ae9db8f398cbee38bbb5f2e09105422d91e4b3f2f7ef70
BLAKE2b-256 checksum
How to use checksums
2f97029a8e13a9ecc4c8764733cdf163979d5188b8d000039274e54927b114d2
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 28, 2026.

Transparency log

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

Download URL tamilpy-0.1.8-py3-none-any.whl
Size 97.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d59d1059f1266059853de40c58972208a7af64b878f32519807eb88ec907dd96
BLAKE2b-256 checksum
How to use checksums
d56251e29ad19e6c1617db5b15fa17534b0e4ee84f74a91aa8323a441ef6622f
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 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.1.10

2 release files

0.1.9

2 release files

This release

0.1.8 This release

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