Skip to main content

Universal Async ORM for SQLite, MySQL, and PostgreSQL

Project description

UniORM

UniORM — SQLite, MySQL va PostgreSQL bilan ishlovchi universal async ORM.
Oddiy API, Django’ga o‘xshash model tizimi va kuchli query builder’ga ega.


🚀 Xususiyatlar

  • ✅ Async (async/await)
  • ✅ SQLite, MySQL, PostgreSQL
  • ✅ Model + Field tizimi
  • ✅ QueryBuilder & Q object
  • ✅ Migratsiyalar
  • ✅ Minimal va yengil

📦 O‘rnatish

pip install uniorm

Yoki manbadan:

git clone https://github.com/yourusername/uniorm.git
cd uniorm
pip install -e .

🔌 Database ulash

SQLite

from uniorm import SqliteDatabase

db = SqliteDatabase("db.sqlite3")

MySQL

from uniorm import MySQLDatabase

db = MySQLDatabase(
    database="test",
    user="root",
    password="password",
    host="localhost"
)

PostgreSQL

from uniorm import PostgreSQLDatabase

db = PostgreSQLDatabase(
    database="test",
    user="postgres",
    password="password"
)

🧱 Model yaratish

from uniorm import Model, CharField, IntField

class User(Model):
    name = CharField(max_length=100)
    age = IntField()

    class Meta:
        database = db

✏️ CRUD amallar

Create

user = await User.create(name="Ali", age=20)

Read

user = await User.get(id=1)
users = await User.filter(age__gte=18)

Update

user.age = 21
await user.save()

Delete

await user.delete()

🔍 QueryBuilder

from uniorm import Q

users = await User.select().where(
    Q(age__gte=18) & Q(name__contains="a")
).order_by("-age").limit(10).execute()

🔄 Migratsiyalar

from uniorm import MigrationManager

manager = MigrationManager(db)
await manager.init()
manager.make_migrations([User])
await manager.migrate()

⚠️ Talablar

  • Python 3.9+
  • aiosqlite (SQLite)
  • asyncmy (MySQL)
  • psycopg[binary] (PostgreSQL)

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

uniorm-1.0.0.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

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

uniorm-1.0.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

Details for the file uniorm-1.0.0.tar.gz.

File metadata

  • Download URL: uniorm-1.0.0.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for uniorm-1.0.0.tar.gz
Algorithm Hash digest
SHA256 02b8d89ece187e942ea80fe0dce646c46d3745f7a455b184c3effaf6b896f3ee
MD5 df4c34e87d47d3eaa07133d43e02549a
BLAKE2b-256 a1c82b1df28c2c40fec628ff35a888cfa0ee799e370c5ba928c31d8211f34e93

See more details on using hashes here.

File details

Details for the file uniorm-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: uniorm-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for uniorm-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ff74d4b90e47d21f818aba8b1864c10586c9690f4ed1f4da3a70698f06bceed
MD5 68e1d6fad696290be0088c806d130709
BLAKE2b-256 d3172a8bdb8ea7efea595be131a09d50d2d51619ad395d80cd6d8f5516358a5e

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