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')
...
...     __backend__ = staticmethod(lambda: 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.5

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

Release files / odbm-0.5.5.tar.gz

Download URL odbm-0.5.5.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6b929bf15339965f40919437b4e1248b05b0607357b5879220a32c88ef13778d
BLAKE2b-256 checksum
How to use checksums
109380b2b469657aaa221592a523e9ab901c10b7dcfc45723ae9067eff0a4c65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for odbm 0.5.5

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