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.5.3

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.5.3
File Size Uploaded Provenance Actions
odbm-0.5.3.tar.gz 5.0 kB Without provenance Details for odbm-0.5.3.tar.gz

Release files / odbm-0.5.3.tar.gz

Download URL odbm-0.5.3.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
54503fe1dcc3f9456cb78e48882ebf0db31aae8c33abd8e1be6aaa58ca6bd7d5
BLAKE2b-256 checksum
How to use checksums
9d17669eb67283f145afc7aed7372ce1d5fd40d69531f5ca22154c2ea84f35e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for odbm 0.5.3

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