Skip to main content

pyorm

Leichtgewichtiges Mini-ORM für SQLite, PostgreSQL und MySQL — kein SQLAlchemy, keine Migrationen, kein globaler Connection-State. Database-Instanzen werden explizit erzeugt und an jeden Model-Aufruf durchgereicht.

Installation

pip install -e .[dev]          # nur SQLite (stdlib)
pip install -e .[dev,postgres] # + psycopg2
pip install -e .[dev,mysql]    # + mysql-connector-python

Beispiel

from pyorm import Database, BaseModel

class User(BaseModel):
    __table__ = "users"
    __primary_key__ = "id"
    __slots__ = ("id", "name", "email", "_db")

db = Database.sqlite(":memory:")
db.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)")

user = User.create(db, name="Ada", email="ada@example.com")
found = User.get(db, id=user.id)

with db.transaction():
    found.update(name="Ada Lovelace")

Für Postgres/MySQL statt Database.sqlite(...):

db = Database.postgres(host="localhost", dbname="app", user="app", password="...")
db = Database.mysql(host="localhost", database="app", user="app", password="...")

Tests

pytest                                  # SQLite-Tests laufen immer
PYORM_TEST_PG_DSN="host=localhost dbname=test user=test password=test" pytest
PYORM_TEST_MYSQL_DSN="host=localhost;database=test;user=test;password=test" pytest

Ohne gesetzte DSN-Umgebungsvariable werden die Postgres-/MySQL-Tests übersprungen.

Metadata

Release files for dialectorm-m1kad0 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dialectorm-m1kad0 0.1.2
File Size Uploaded Provenance Actions
dialectorm_m1kad0-0.1.2.tar.gz 12.4 MB Without provenance Details for dialectorm_m1kad0-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dialectorm-m1kad0 0.1.2
File Interpreter ABI Platform Actions
dialectorm_m1kad0-0.1.2-py3-none-any.whl Python 3 none any Details for dialectorm_m1kad0-0.1.2-py3-none-any.whl

Total release size: 12.4 MB

Release files / dialectorm_m1kad0-0.1.2.tar.gz

Download URL dialectorm_m1kad0-0.1.2.tar.gz
Size 12.4 MB
Tags Source
SHA-256 checksum
How to use checksums
8b1aa8912f623038ef4c8158a6b44fba32ffea6518331f4dc06575d3b8321382
BLAKE2b-256 checksum
How to use checksums
3921e0f41b38358bfb551c2875b8a08b6f2e3d9dfa9b41e29597f22191937659
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / dialectorm_m1kad0-0.1.2-py3-none-any.whl

Download URL dialectorm_m1kad0-0.1.2-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2c687ea50a043a1da7afbb7b920e9e661b82d4ff2bc21ba47cd6986ef8a7ea94
BLAKE2b-256 checksum
How to use checksums
4db2d49ff541e6d6d2fbaa21f7533e8169708f9f19cc0b1d6b04ab1fbc80703c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for dialectorm-m1kad0 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page