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

Currently supports

  • SQLite
  • PostgreSQL

[!CAUTION] :warning: sillyORM is not ready for use in production environments. It is still alpha 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
from sillyorm.dbms import sqlite


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

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


# Create the environment
env = sillyorm.Environment(
    sqlite.SQLiteConnection("test.db").cursor()
)

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

# create the database tables
env.init_tables()

# 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 newest version. 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-0.7.0.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

sillyORM-0.7.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sillyorm-0.7.0.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for sillyorm-0.7.0.tar.gz
Algorithm Hash digest
SHA256 0ffc1553106612f9a77b12c7579fcbdfc6342ae421117276604cab360d9006f8
MD5 e222fb1ac1168c98aff1e45d5cb38970
BLAKE2b-256 a84839a045935c9a451e9875641ec07431af1b8f3e3c9cc8a299bcb044888d2f

See more details on using hashes here.

File details

Details for the file sillyORM-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: sillyORM-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for sillyORM-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ecd63044323b1a6a6c4696bca8c930b4c2fbd27c7bf02555eaa16a2b14e23c52
MD5 c81283bea00f92a3159d0ebcae0ccda2
BLAKE2b-256 f142b4d3ffc3ba7eb0e44a009d1100364bfb83b7e9a1cd3ca54a374bbc27d8ee

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page