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

Release files / odbm-0.5.4.tar.gz

Download URL odbm-0.5.4.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4776d2d5940543dafcf3254aaa6acc619afba0656994f47d9ca0eb17ae511aee
BLAKE2b-256 checksum
How to use checksums
6520ed052218600ff26bce4131207ee0933aaaa0c60e657ccd83dd362ee124c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for odbm 0.5.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