Skip to main content

TamilPY Framework — schema-driven Python web framework

Project description

TamilPY

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+


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

Installation

pip install tamilPY

Verify the install:

tpy 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


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

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>)

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

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


License

MIT © Selvaganapathi Arumugam

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tamilpy-0.1.6.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tamilpy-0.1.6-py3-none-any.whl (74.3 kB view details)

Uploaded Python 3

File details

Details for the file tamilpy-0.1.6.tar.gz.

File metadata

  • Download URL: tamilpy-0.1.6.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tamilpy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 094c46ddb8dc95b538a7098ec27bd8868eae290b6ae2a3707cb15be83aeb2f24
MD5 68afaea7e8a4b29d60023df2e1fb5687
BLAKE2b-256 ad01478c7a059fc1ddf5ae8fb905e1f69dfd32996a9b98ebe73b2cfe94e196fe

See more details on using hashes here.

File details

Details for the file tamilpy-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: tamilpy-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 74.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for tamilpy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4fe4b9541bc759521acd926f451e08c7133801cac1b5ac71475e87a6fc1f21a3
MD5 6dde21d1cfadfa7688b26101164c293d
BLAKE2b-256 01820527708dd3d88a369c3414c5eeb831c134d315afe5175de77001696ef9a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page