Skip to main content

odbm

Installation

$ pip install odbm

Usage

>>> from datetime import datetime
>>> import odbm
>>> class User(odbm.Model):
...     username = odbm.UnicodeProperty(primary_key=True)
...     friends  = odbm.Property(default=[], key='f')
...     created  = odbm.DateTimeProperty(key='c')
...
...     __db_type__ = 'dict'
>>> User(
...     username = 'foo',
...     friends  = ['bar', 'baz'],
...     created = datetime.now(),
... ).save()
>>> User(username='bar', created = datetime.now()).save()
>>> User(username='baz', created = datetime.now()).save()
>>> User.get('foo').friends
['bar', 'baz']
>>> [u.username for u in User.find(
...     filter  = lambda u: not u.friends,
...     order   = lambda x: x.created)]
[u'bar', u'baz']
>>> User.count()
3
>>> User.count(lambda u: 'baz' in u.friends)
1
>>> User.find_one().delete()
>>> User.count()
2

Metadata

Release files for odbm 0.4.1

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

Source distribution (sdist)

Source distribution for odbm 0.4.1
File Size Uploaded Provenance Actions
odbm-0.4.1.tar.gz 4.8 kB Without provenance Details for odbm-0.4.1.tar.gz

Release files / odbm-0.4.1.tar.gz

Download URL odbm-0.4.1.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
708b7ceeee3244dd2bcac363612d23e9f8227ce4e04099a997ce5938550045c2
BLAKE2b-256 checksum
How to use checksums
f0a81731b70d2676a028cdc21d5e910076e6dd50f460444b502b71214f2de731
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for odbm 0.4.1

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.

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