{"id":20820638,"url":"https://github.com/mongoengine/marshmallow-mongoengine","last_synced_at":"2025-04-06T21:15:49.115Z","repository":{"id":15688898,"uuid":"78420822","full_name":"MongoEngine/marshmallow-mongoengine","owner":"MongoEngine","description":"Mongoengine integration with marshmallow","archived":false,"fork":false,"pushed_at":"2023-08-27T04:20:06.000Z","size":170,"stargazers_count":77,"open_issues_count":2,"forks_count":34,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-21T01:11:52.855Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"touilleMan/marshmallow-mongoengine","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MongoEngine.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-09T10:58:50.000Z","updated_at":"2024-06-18T18:25:21.439Z","dependencies_parsed_at":"2024-06-18T18:37:01.201Z","dependency_job_id":null,"html_url":"https://github.com/MongoEngine/marshmallow-mongoengine","commit_stats":{"total_commits":173,"total_committers":25,"mean_commits":6.92,"dds":0.4393063583815029,"last_synced_commit":"7d369a8c939503bd2c96b81f658410506c74d5c6"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoEngine%2Fmarshmallow-mongoengine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoEngine%2Fmarshmallow-mongoengine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoEngine%2Fmarshmallow-mongoengine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MongoEngine%2Fmarshmallow-mongoengine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MongoEngine","download_url":"https://codeload.github.com/MongoEngine/marshmallow-mongoengine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550691,"owners_count":20956987,"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-11-17T22:09:42.546Z","updated_at":"2025-04-06T21:15:49.098Z","avatar_url":"https://github.com/MongoEngine.png","language":"Python","readme":".. image:: https://travis-ci.org/MongoEngine/marshmallow-mongoengine.svg?branch=master\n    :target: https://travis-ci.org/MongoEngine/marshmallow-mongoengine\n    :alt: Travis-CI\n\n.. image:: https://readthedocs.org/projects/marshmallow-mongoengine/badge/?version=latest\n    :target: http://marshmallow-mongoengine.readthedocs.org/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://coveralls.io/repos/github/MongoEngine/marshmallow-mongoengine/badge.svg?branch=master\n    :target: https://coveralls.io/github/MongoEngine/marshmallow-mongoengine?branch=master\n    :alt: Code Coverage\n\nmarshmallow-mongoengine\n=======================\n\n`Mongoengine \u003chttp://mongoengine.org\u003e`_ integration with the  `marshmallow\n\u003chttps://marshmallow.readthedocs.org/en/latest/\u003e`_ (de)serialization library.\n\nSee documentation at http://marshmallow-mongoengine.rtfd.org/\n\nDeclare your models\n-------------------\n\n.. code-block:: python\n\n    import mongoengine as me\n\n    class Author(me.Document):\n        id = me.IntField(primary_key=True, default=1)\n        name = me.StringField()\n        books = me.ListField(me.ReferenceField('Book'))\n\n        def __repr__(self):\n            return '\u003cAuthor(name={self.name!r})\u003e'.format(self=self)\n\n\n    class Book(me.Document):\n        title = me.StringField()\n\nGenerate marshmallow schemas\n----------------------------\n\n.. code-block:: python\n\n    from marshmallow_mongoengine import ModelSchema\n\n    class AuthorSchema(ModelSchema):\n        class Meta:\n            model = Author\n\n    class BookSchema(ModelSchema):\n        class Meta:\n            model = Book\n\n    author_schema = AuthorSchema()\n\n(De)serialize your data\n-----------------------\n\n.. code-block:: python\n\n    author = Author(name='Chuck Paluhniuk').save()\n    book = Book(title='Fight Club', author=author).save()\n\n    dump_data = author_schema.dump(author).data\n    # {'id': 1, 'name': 'Chuck Paluhniuk', 'books': ['5578726b7a58012298a5a7e2']}\n\n    author_schema.load(dump_data).data\n    # \u003cAuthor(name='Chuck Paluhniuk')\u003e\n\nGet it now\n----------\n::\n\n   pip install -U marshmallow-mongoengine\n\nLicense\n-------\n\nMIT licensed. See the bundled `LICENSE \u003chttps://github.com/touilleMan/marshmallow-mongoengine/blob/master/LICENSE\u003e`_ file for more details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoengine%2Fmarshmallow-mongoengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongoengine%2Fmarshmallow-mongoengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongoengine%2Fmarshmallow-mongoengine/lists"}