{"id":13461725,"url":"https://github.com/marshmallow-code/marshmallow","last_synced_at":"2025-09-09T21:07:12.348Z","repository":{"id":11753372,"uuid":"14284859","full_name":"marshmallow-code/marshmallow","owner":"marshmallow-code","description":"A lightweight library for converting complex objects to and from simple Python datatypes.","archived":false,"fork":false,"pushed_at":"2025-04-24T03:11:56.000Z","size":6795,"stargazers_count":7137,"open_issues_count":131,"forks_count":631,"subscribers_count":75,"default_branch":"dev","last_synced_at":"2025-05-03T07:26:41.603Z","etag":null,"topics":["deserialization","marshalling","python","schema","serde","serialization","validation"],"latest_commit_sha":null,"homepage":"https://marshmallow.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marshmallow-code.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"open_collective":"marshmallow","tidelift":"pypi/marshmallow"}},"created_at":"2013-11-10T21:32:24.000Z","updated_at":"2025-05-02T17:52:59.000Z","dependencies_parsed_at":"2023-09-29T08:50:57.753Z","dependency_job_id":"850ccd8e-7485-4e1a-a7de-a8ea51cb4fd5","html_url":"https://github.com/marshmallow-code/marshmallow","commit_stats":{"total_commits":2722,"total_committers":217,"mean_commits":"12.543778801843319","dds":"0.45885378398236587","last_synced_commit":"9716fc629976c9d3ce30cd15d270d9ac235eb725"},"previous_names":[],"tags_count":189,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marshmallow-code%2Fmarshmallow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marshmallow-code%2Fmarshmallow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marshmallow-code%2Fmarshmallow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marshmallow-code%2Fmarshmallow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marshmallow-code","download_url":"https://codeload.github.com/marshmallow-code/marshmallow/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252525617,"owners_count":21762331,"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":["deserialization","marshalling","python","schema","serde","serialization","validation"],"created_at":"2024-07-31T11:00:54.717Z","updated_at":"2025-05-05T15:46:07.281Z","avatar_url":"https://github.com/marshmallow-code.png","language":"Python","readme":"********************************************\nmarshmallow: simplified object serialization\n********************************************\n\n|pypi| |build-status| |pre-commit| |docs|\n\n.. |pypi| image:: https://badgen.net/pypi/v/marshmallow\n    :target: https://pypi.org/project/marshmallow/\n    :alt: Latest version\n\n.. |build-status| image:: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml/badge.svg\n    :target: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml\n    :alt: Build status\n\n.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/marshmallow-code/marshmallow/dev.svg\n   :target: https://results.pre-commit.ci/latest/github/marshmallow-code/marshmallow/dev\n   :alt: pre-commit.ci status\n\n.. |docs| image:: https://readthedocs.org/projects/marshmallow/badge/\n   :target: https://marshmallow.readthedocs.io/\n   :alt: Documentation\n\n.. start elevator-pitch\n\n**marshmallow** is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.\n\n.. code-block:: python\n\n    from datetime import date\n    from pprint import pprint\n\n    from marshmallow import Schema, fields\n\n\n    class ArtistSchema(Schema):\n        name = fields.Str()\n\n\n    class AlbumSchema(Schema):\n        title = fields.Str()\n        release_date = fields.Date()\n        artist = fields.Nested(ArtistSchema())\n\n\n    bowie = dict(name=\"David Bowie\")\n    album = dict(artist=bowie, title=\"Hunky Dory\", release_date=date(1971, 12, 17))\n\n    schema = AlbumSchema()\n    result = schema.dump(album)\n    pprint(result, indent=2)\n    # { 'artist': {'name': 'David Bowie'},\n    #   'release_date': '1971-12-17',\n    #   'title': 'Hunky Dory'}\n\nIn short, marshmallow schemas can be used to:\n\n- **Validate** input data.\n- **Deserialize** input data to app-level objects.\n- **Serialize** app-level objects to primitive Python types. The serialized objects can then be rendered to standard formats such as JSON for use in an HTTP API.\n\nGet it now\n==========\n\n.. code-block:: shell-session\n\n    $ pip install -U marshmallow\n\n.. end elevator-pitch\n\nDocumentation\n=============\n\nFull documentation is available at https://marshmallow.readthedocs.io/ .\n\nEcosystem\n=========\n\nA list of marshmallow-related libraries can be found at the GitHub wiki here:\n\nhttps://github.com/marshmallow-code/marshmallow/wiki/Ecosystem\n\nCredits\n=======\n\nContributors\n------------\n\nThis project exists thanks to all the people who contribute.\n\n**You're highly encouraged to participate in marshmallow's development.**\nCheck out the `Contributing Guidelines \u003chttps://marshmallow.readthedocs.io/en/latest/contributing.html\u003e`_ to see how you can help.\n\nThank you to all who have already contributed to marshmallow!\n\n.. image:: https://opencollective.com/marshmallow/contributors.svg?width=890\u0026button=false\n    :target: https://marshmallow.readthedocs.io/en/latest/authors.html\n    :alt: Contributors\n\nBackers\n-------\n\nIf you find marshmallow useful, please consider supporting the team with\na donation. Your donation helps move marshmallow forward.\n\nThank you to all our backers! [`Become a backer`_]\n\n.. _`Become a backer`: https://opencollective.com/marshmallow#backer\n\n.. image:: https://opencollective.com/marshmallow/backers.svg?width=890\n    :target: https://opencollective.com/marshmallow#backers\n    :alt: Backers\n\nSponsors\n--------\n\n.. start sponsors\n\nmarshmallow is sponsored by `Route4Me \u003chttps://route4me.com\u003e`_.\n\n.. image:: https://github.com/user-attachments/assets/018c2e23-032e-4a11-98da-8b6dc25b9054\n    :target: https://route4me.com\n    :alt: Routing Planner\n\nSupport this project by becoming a sponsor (or ask your company to support this project by becoming a sponsor).\nYour logo will be displayed here with a link to your website. [`Become a sponsor`_]\n\n.. _`Become a sponsor`: https://opencollective.com/marshmallow#sponsor\n\n.. end sponsors\n\nProfessional Support\n====================\n\nProfessionally-supported marshmallow is now available through the\n`Tidelift Subscription \u003chttps://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow\u0026utm_medium=readme\u003e`_.\n\nTidelift gives software development teams a single source for purchasing and maintaining their software,\nwith professional-grade assurances from the experts who know it best,\nwhile seamlessly integrating with existing tools. [`Get professional support`_]\n\n.. _`Get professional support`: https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=marshmallow\u0026utm_medium=referral\u0026utm_campaign=github\n\n.. image:: https://user-images.githubusercontent.com/2379650/45126032-50b69880-b13f-11e8-9c2c-abd16c433495.png\n    :target: https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow\u0026utm_medium=readme\n    :alt: Get supported marshmallow with Tidelift\n\n\nProject Links\n=============\n\n- Docs: https://marshmallow.readthedocs.io/\n- Changelog: https://marshmallow.readthedocs.io/en/latest/changelog.html\n- Contributing Guidelines: https://marshmallow.readthedocs.io/en/latest/contributing.html\n- PyPI: https://pypi.org/project/marshmallow/\n- Issues: https://github.com/marshmallow-code/marshmallow/issues\n- Donate: https://opencollective.com/marshmallow\n\nLicense\n=======\n\nMIT licensed. See the bundled `LICENSE \u003chttps://github.com/marshmallow-code/marshmallow/blob/dev/LICENSE\u003e`_ file for more details.\n","funding_links":["https://opencollective.com/marshmallow","https://tidelift.com/funding/github/pypi/marshmallow","https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow\u0026utm_medium=readme","https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=marshmallow\u0026utm_medium=referral\u0026utm_campaign=github"],"categories":["Serialization","Python","资源列表","Libraries in Python","Data Format \u0026 I/O","序列化","Forms","APIs \u0026 Serialization","Data Serialization","Model, Schema","Serialization [🔝](#readme)","Python decorator in the wild","Awesome Python"],"sub_categories":["序列化","Tools","For Python","Serialization"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarshmallow-code%2Fmarshmallow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarshmallow-code%2Fmarshmallow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarshmallow-code%2Fmarshmallow/lists"}