{"id":22899663,"url":"https://github.com/eguven/nanomongo","last_synced_at":"2025-05-08T01:09:32.478Z","repository":{"id":7851313,"uuid":"9223240","full_name":"eguven/nanomongo","owner":"eguven","description":"Minimal Python ODM for MongoDB","archived":false,"fork":false,"pushed_at":"2018-04-03T09:28:10.000Z","size":156,"stargazers_count":11,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-08T01:09:25.909Z","etag":null,"topics":["database","database-design","mongodb","odm","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eguven.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-04-04T17:08:23.000Z","updated_at":"2024-05-09T19:18:04.000Z","dependencies_parsed_at":"2022-08-27T03:40:15.367Z","dependency_job_id":null,"html_url":"https://github.com/eguven/nanomongo","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eguven%2Fnanomongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eguven%2Fnanomongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eguven%2Fnanomongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eguven%2Fnanomongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eguven","download_url":"https://codeload.github.com/eguven/nanomongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252978768,"owners_count":21834916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["database","database-design","mongodb","odm","python"],"created_at":"2024-12-14T01:15:25.194Z","updated_at":"2025-05-08T01:09:32.440Z","avatar_url":"https://github.com/eguven.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=========\nnanomongo\n=========\n\n.. image:: https://travis-ci.org/eguven/nanomongo.png\n        :target: https://travis-ci.org/eguven/nanomongo\n\n**nanomongo** is a minimal MongoDB Object-Document Mapper for Python. It does not attempt to be a feature-complete\nODM but if you enjoy using PyMongo_ API with dictionaries and often find yourself writing validators and\n``pymongo.Collection`` wrappers, nanomongo might suit your needs.\n\n**Quick Links**: `Source (github) \u003chttps://github.com/eguven/nanomongo\u003e`_ - `Documentation (rtd) \u003chttps://nanomongo.readthedocs.org/\u003e`_ - `Packages (PyPi) \u003chttps://pypi.python.org/pypi/nanomongo/\u003e`_ - `Changelog \u003chttps://github.com/eguven/nanomongo/blob/master/CHANGELOG.md\u003e`_\n\nQuickstart\n-----------\n\n::\n\n    import pymongo\n    from nanomongo import Field, BaseDocument\n\n    client = pymongo.MongoClient()\n\n    # python3 notation, see documentation for python2 options\n    # we can omit the keyword arguments here and later call MyDoc.register(client=client, db='dbname')\n    class MyDoc(BaseDocument, dot_notation=True, client=client, db='dbname'):\n        foo = Field(str)\n        bar = Field(int, required=False)\n\n        __indexes__ = [\n            pymongo.IndexModel('foo'),\n            pymongo.IndexModel([('bar', 1), ('foo', -1)], unique=True),\n        ]\n\n    doc = MyDoc(foo='L33t')  # creates document {'foo': 'L33t'}\n    doc.insert()             # inserts document {'_id': ObjectId('...'), 'foo': 'L33t'}\n    doc.bar = 42             # records the change\n    doc.save()               # calls collection.update_one {'$set': {'bar': 42}}\n\n    MyDoc.find_one({'foo': 'L33t'})\n    {'_id': ObjectId('...'), 'bar': 42, 'foo': 'L33t'}\n\n:Author: Eren Güven (GitHub_, Twitter_)\n:License: `Apache License 2.0 \u003chttps://github.com/eguven/nanomongo/blob/master/LICENSE\u003e`_\n\n.. _PyMongo: https://api.mongodb.com/python/current\n.. _GitHub: https://github.com/eguven\n.. _Twitter: https://twitter.com/cyberfart\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feguven%2Fnanomongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feguven%2Fnanomongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feguven%2Fnanomongo/lists"}