{"id":13480793,"url":"https://github.com/slacy/minimongo","last_synced_at":"2025-04-05T02:12:30.124Z","repository":{"id":1248008,"uuid":"1186522","full_name":"slacy/minimongo","owner":"slacy","description":"A lightweight, Pythonic, Object Oriented Interface to MongoDB.","archived":false,"fork":false,"pushed_at":"2020-01-28T15:38:15.000Z","size":288,"stargazers_count":332,"open_issues_count":16,"forks_count":50,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-29T01:04:37.116Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/slacy.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.txt","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":"2010-12-21T07:04:07.000Z","updated_at":"2024-09-19T09:33:59.000Z","dependencies_parsed_at":"2022-08-16T12:45:13.067Z","dependency_job_id":null,"html_url":"https://github.com/slacy/minimongo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slacy%2Fminimongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slacy%2Fminimongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slacy%2Fminimongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slacy%2Fminimongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slacy","download_url":"https://codeload.github.com/slacy/minimongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247276189,"owners_count":20912288,"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":[],"created_at":"2024-07-31T17:00:45.076Z","updated_at":"2025-04-05T02:12:30.110Z","avatar_url":"https://github.com/slacy.png","language":"Python","funding_links":[],"categories":["Libraries","Python"],"sub_categories":["Python"],"readme":"minimongo\n=========\n\n:Info: Minimal database Model management for MongoDB.\n:Author: Steve Lacy (github@slacy.com)\n\n\nAbout\n-----\n\n``minimongo`` is a lightweight, schemaless, Pythonic Object-Oriented\ninterface to MongoDB.\n\nIt provides a very thin, dynamicly typed (schema-less) object management\nlayer for any data stored in any MongoDB collection. ``minimongo`` directly\ncalls the existing pymongo_ query syntax.\n\n``minimongo`` can easily layer on top of existing MongoDB collections, and\nwill work properly with almost any existing schema, even from third party\napplications.\n\n\nInstallation\n------------\n\nIf you have `setuptools \u003chttp://peak.telecommunity.com/DevCenter/setuptools\u003e`_\nyou can use ``easy_install -U minimongo``. Otherwise, you can download the\nsource from `GitHub \u003chttp://github.com/slacy/minimongo\u003e`_ and run ``python\nsetup.py install``.\n\n\nDependencies\n============\n- pymongo_ 1.9+\n- `sphinx \u003chttp://sphinx.pocoo.org\u003e`_ (optional -- for documentation generation)\n\n\nExample\n-------\n\nHere's a very brief example of creating an object, querying for it, modifying\na field, and then saving it back again:\n\n.. code:: python\n\n    from minimongo import Model, Index\n\n    class Foo(Model):\n        class Meta:\n            # Here, we specify the database and collection names.\n            # A connection to your DB is automatically created.\n            database = \"minimongo\"\n            collection = \"rocks\"\n\n            # Now, we programatically declare what indices we want.\n            # The arguments to the Index constructor are identical to\n            # the args to pymongo\"s ensure_index function.\n            indices = (\n                Index(\"a\"),\n            )\n\n\n    if __name__ == \"__main__\":\n        # Create \u0026 save an object, and return a local in-memory copy of it:\n        foo = Foo({\"x\": 1, \"y\": 2}).save()\n\n        # Find that object again, loading it into memory:\n        foo = Foo.collection.find_one({\"x\": 1})\n\n        # Change a field value, and save it back to the DB.\n        foo.other = \"some data\"\n        foo.save()\n\n\nFeedback welcome!\n-----------------\n\nPlease email github@slacy.com with comments, suggestions, or comment via\nhttp://github.com/slacy/minimongo\n\n.. _pymongo: http://api.mongodb.org/python/1.9%2B/index.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslacy%2Fminimongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslacy%2Fminimongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslacy%2Fminimongo/lists"}