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.1.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.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydsql-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 fb952f957310b96914d301390054c2eaf181d80cdde1e25a9b3db36e40d83adb
MD5 c4f72cb43ed6c380af5ab873afb34807
BLAKE2b-256 c148159e09be5c260a1ae43fdd8e7947dee7aabc54704f4f538daffb7943a99d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydsql-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f7a30df38b123fbef2697ac136c9beead895f79f854cba0d392a3a37857aedee
MD5 748bab432b1790ff5e6f8d59c8188af1
BLAKE2b-256 aaab610a3558365bec90a523f7fde944af8f9f41aa869fa2eb33987ef51cfe4f

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