Skip to main content

an ORM library

Project description

sillyORM

License: LGPL v3 CI: Python test CI: Python mypy PyPI

simple ORM library written in Python

Should work with most DBMS that SQLAlchemy supports as it uses SQLAlchemy core, but it's only tested with

  • SQLite
  • PostgreSQL

[!CAUTION] :warning: sillyORM is not ready for use in production environments. It is still beta software and under development. The API is unstable, and each release may introduce breaking changes. There may even be security vulnerabilities present. If you use it anyway, make sure to pin the version!

Projects using sillyORM

Installation

pip install sillyorm

Usage

import sillyorm


# define a model, a model abstracts a table in the database
class Example(sillyorm.model.Model):
    _name = "example"  # database table name (sanitized) & name in environment

    # fields
    name = sillyorm.fields.String(length=255)


# connect to the DB and create a model registry
registry = sillyorm.Registry("sqlite:///test.db")

# register the model in the environment
registry.register_model(Example)

# create the database tables
registry.resolve_tables()
registry.init_db_tables()
env = registry.get_environment(autocommit=True)

# start using the model
record = env["example"].create({"name": "Hello world!"})
print(record.name)

Documentation

Read the docs here

[!NOTE] The docs are always for the latest release. If you need docs for another version you must build them yourself

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

sillyorm-1.1.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

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

sillyorm-1.1.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file sillyorm-1.1.0.tar.gz.

File metadata

  • Download URL: sillyorm-1.1.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sillyorm-1.1.0.tar.gz
Algorithm Hash digest
SHA256 aab36977fb6e54a7d1269857406ed5999436e5836ccbbdd393909c235b39efe4
MD5 c03d4f3efb219767b55fa075ef2b2b99
BLAKE2b-256 59e934102f0ba1906462993a4301f5d81dacf6aa706e8ac61eae5738b895ab13

See more details on using hashes here.

Provenance

The following attestation bundles were made for sillyorm-1.1.0.tar.gz:

Publisher: release.yml on theverygaming/sillyORM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sillyorm-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: sillyorm-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sillyorm-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 46e926452a3f200bcc5333e3858353a7b0bc14f0306bf84ed981a3e5b67a29fc
MD5 d1183afff227fb48b5561d63b3155e0e
BLAKE2b-256 d5348ede753dd804b4a00a9e5d4d53738206d889e6d790e0b28957248a596676

See more details on using hashes here.

Provenance

The following attestation bundles were made for sillyorm-1.1.0-py3-none-any.whl:

Publisher: release.yml on theverygaming/sillyORM

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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