Skip to main content

A simple ORM for Python

Project description

Orbit-Orator

A simple ORM for Python, forked from Orator.

Installation

pip install orbit-orator

Basic Usage

from orbit_orator import DatabaseManager, Model

config = {
    'mysql': {
        'driver': 'mysql',
        'host': 'localhost',
        'database': 'database',
        'user': 'root',
        'password': '',
        'prefix': ''
    }
}

db = DatabaseManager(config)
Model.set_connection_resolver(db)

class User(Model):
    pass

users = User.where('votes', '>', 100).take(10).get()

for user in users:
    print(user.name)

License

MIT License

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

orbit_orator-0.9.9.12.tar.gz (116.3 kB view details)

Uploaded Source

Built Distribution

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

orbit_orator-0.9.9.12-py3-none-any.whl (169.8 kB view details)

Uploaded Python 3

File details

Details for the file orbit_orator-0.9.9.12.tar.gz.

File metadata

  • Download URL: orbit_orator-0.9.9.12.tar.gz
  • Upload date:
  • Size: 116.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for orbit_orator-0.9.9.12.tar.gz
Algorithm Hash digest
SHA256 43ef0a6c1b67c741bb7da73ac4bd463be0ce0b6248e2291fb9794cdc2d2466e6
MD5 cb9b1b2dd70b80869b41eac8738095a1
BLAKE2b-256 17ea0bc85532e43a913f184c1b20a42d76aac0a89ba3019ce7c7fa57d34eaf14

See more details on using hashes here.

File details

Details for the file orbit_orator-0.9.9.12-py3-none-any.whl.

File metadata

File hashes

Hashes for orbit_orator-0.9.9.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b0781ad290b7b6e92cd724dde970c5213915bf6d6006bcd32fd8ae263259d61e
MD5 d4486e455fa779f083b548b5da7f0dad
BLAKE2b-256 ccdfc640517ec5ce3fb3c7c8e3d5ea892df5c35479b660d55a5dff5d8c0a8698

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