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.15.tar.gz (116.2 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.15-py3-none-any.whl (169.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: orbit_orator-0.9.9.15.tar.gz
  • Upload date:
  • Size: 116.2 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.15.tar.gz
Algorithm Hash digest
SHA256 e1cc08beb31e12ee2333c358a299f5010fb92da89854a110a378168d6eedc885
MD5 6acb4b463d2952778dd25aa32572f29b
BLAKE2b-256 762e0a16d1e862b646e7ce6ee89c473cdcae991df1813592e4be2c353ca1772e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for orbit_orator-0.9.9.15-py3-none-any.whl
Algorithm Hash digest
SHA256 aa57a68cd8f92baced760e5f96ecbea38b38ac0466263bbde44169d1a274f120
MD5 a50fbd0648ada99cb3c4091f9e685d86
BLAKE2b-256 bdff87b29f3890c49d52c5a03107b942499059bf171ed5d8060567174f0c7968

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