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

You can now install PydSQL directly from PyPI:

pip install pydsql

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.2.tar.gz (3.5 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.2-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydsql-0.1.2.tar.gz
  • Upload date:
  • Size: 3.5 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.2.tar.gz
Algorithm Hash digest
SHA256 718f3d015bf9dc0fdf5d461196c85acd5c04e6e6b997a8c607c519d25ef666ec
MD5 6cb859639f3216ac5037737da1480a26
BLAKE2b-256 22672e666e7fc95c9fbe59c6be3eb2967f1b6c54f1204bc238c86ef0dadd930f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydsql-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.5 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7edb28f9e46400df2ad5c3bc8ef97f4d4fd4e0c693cb608e9db7892fe2786a1a
MD5 f3ece909469f9ecf4601f381af85544f
BLAKE2b-256 471658f3ef1ed4539e2b64f714b20918e968e986748caa454dca7403e62873b5

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