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

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

Release files / odbm-0.4.tar.gz

Download URL odbm-0.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
077fbde620c29ce9d9c8bee10517810f3f05409081079f11f1758a4f5286b5d3
BLAKE2b-256 checksum
How to use checksums
6138ef832776b5c15d5c6a04bca33561905e22a48a2b461d1a885a9094a751e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for odbm 0.4

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