Feature 02 · Study guide
Choose SQLite, PostgreSQL, MySQL, or MongoDB — and learn how tamilPY stores and uses that choice.
| Provider | Best for | Notes |
|---|---|---|
sqlite | Learning / local demos | No server; file-based |
postgres | Production SQL | Full FK / indexes |
mysql | Production SQL | Same CRUD path |
mongodb | Documents | Collections + indexes; refs are metadata |
$ tpy build
The wizard asks for provider, host, port, user, and password. It writes:
.env — connection URL / credentialstpy.toml — app settingsschema.tpy — optional database … line$ pip install "tamilPY[all]" # SQL + Mongo drivers $ pip install "tamilPY[redis]" # Redis cache/queue
$ tpy db configure $ tpy db info $ tpy db ping
info prints the active provider and URL shape. ping opens a real connection so you know credentials work before migrate.
Providers are selected from config. Generated repositories call the active provider for SQL/Mongo operations. You usually do not import drivers yourself inside controllers.
schema.tpy database line without updating .env.