
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
ognom
Advanced tools
.. image:: https://travis-ci.org/lorehov/ognom.svg :target: https://travis-ci.org/lorehov/ognom :alt: Build Status
.. image:: https://img.shields.io/pypi/v/ognom.svg :target: https://pypi.python.org/pypi/ognom :alt: Latest Version
Documentation: #TODO
Ognom is object-to-document mapper for mongodb <https://www.mongodb.org>. Currently ognom uses pymongo <https://api.mongodb.org/python/current/> as default backend,
but you can easily implement your own backend based on another driver (for example asyncio-mongo <https://pypi.python.org/pypi/asyncio_mongo>_) if needed,
as serialization and storage logic in ognom are separated.
Supports python2.7+, python3.3+, PyPy.
Documentation: #TODO
.. code-block:: python
pip install ognom
.. code-block:: python
tox
.. code-block:: python
from ognom.base import ConnectionManager, Document, Collection
from ognom.fields import StringField, IntField
ConnectionManager.connect({
'main': { # ognom use aliases for databases to make it possible to use multiple db's per project
'name': 'birzha_main',
'args': ['127.0.0.1:27017'],
'kwargs': {'socketTimeoutMS': 60000}},})
class Foo(Document):
objects = Collection(
db_name='main'
collection_name='my_foos' # collection name (by default 'foos')
indexes=[{
'index': [('bar', 1), ('baz', -1)],
'background': True}])
bar = StringField(required=True, default='baaar')
baz = IntField(choices=[10, 20, 30, 40, 50])
foo1 = Foo.objects.create({'bar': 'lalala'})
assert Foo.objects.get({'bar': 'lalala'}).id == foo1.id
foo2 = Foo(bar='lololo', baz=10)
assert foo2.id is None
foo2.save()
assert foo2.id is not None
foo2.remove()
foos = Foo.objects.find({'bar': 'lalala'}) # not list but CursorWrapper!
assert len(list(foos)) == 1
@lorehov <https://github.com/lorehov>_@wronglink <https://github.com/wronglink>_@sardnej <https://github.com/sardnej>_FAQs
Neat ODM wrapper around great PyMongo driver
We found that ognom demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.