Skip to main content

Lightweight tool to generate SQL CREATE TABLE statements directly from Pydantic models.

Project description

PydSQL

PyPI version
A lightweight Python utility to generate SQL CREATE TABLE statements directly from your Pydantic models.


What is PydSQL?

PydSQL is a simple, focused developer tool that bridges the gap between your Pydantic data models and your SQL database schema. It reads your Pydantic model and automatically generates a corresponding CREATE TABLE statement, saving you time and preventing manual errors.

It is not a full ORM like SQLAlchemy. It's a "get out of the way" utility for developers who want to write their own SQL queries but hate writing boilerplate schema definitions.

Why Does it Exist?

While working with powerful tools like SQLAlchemy, I realized that for many smaller projects or quick prototypes, a full ORM can be overkill. The setup is complex, and it hides the underlying SQL.

However, without an ORM, I was back to manually writing CREATE TABLE statements, which was repetitive and error-prone. It was easy for my database schema to drift out of sync with my Pydantic models.

PydSQL was built to solve this specific pain point. It automates the most tedious part of setting up a database—schema creation—while leaving you in full control to write your own SQL.

Installation

PydSQL is not yet published to PyPI. Until it is released, you can install it locally from source:

git clone https://github.com/pranavkp71/PydSQL.git
cd pydsql
pip install .

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

pydsql-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

pydsql-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file pydsql-0.1.0.tar.gz.

File metadata

  • Download URL: pydsql-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for pydsql-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3fc4d0fc01e3ed4eb29845c5f1d44288f27c5b00b8b18b5c96ee9b2e2c59ac99
MD5 badbccff275ffbdfd7a779661b7d320b
BLAKE2b-256 d12cb6677a9c36f2428edaf8ec827456b574309e5ddbcc9cd650e8d2a0e1cdbe

See more details on using hashes here.

File details

Details for the file pydsql-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydsql-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for pydsql-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6f6e77c379669c4ef32d2351116b875a91b5914e883000ffdf0b526dbe35f028
MD5 5840757bf8f73dbc8e90381d7b3c913b
BLAKE2b-256 24e38e3866df31e1c1e649b9702f3d8f2b791f1e258f4df5fffd84938be7a704

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