Name | marshmallow JSON |
Version |
3.25.1
JSON |
| download |
home_page | None |
Summary | A lightweight library for converting complex datatypes to and from native Python datatypes. |
upload_time | 2025-01-11 23:36:48 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
********************************************
marshmallow: simplified object serialization
********************************************
|pypi| |build-status| |pre-commit| |docs|
.. |pypi| image:: https://badgen.net/pypi/v/marshmallow
:target: https://pypi.org/project/marshmallow/
:alt: Latest version
.. |build-status| image:: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml/badge.svg
:target: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml
:alt: Build status
.. |pre-commit| image:: https://results.pre-commit.ci/badge/github/marshmallow-code/marshmallow/dev.svg
:target: https://results.pre-commit.ci/latest/github/marshmallow-code/marshmallow/dev
:alt: pre-commit.ci status
.. |docs| image:: https://readthedocs.org/projects/marshmallow/badge/
:target: https://marshmallow.readthedocs.io/
:alt: Documentation
.. start elevator-pitch
**marshmallow** is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.
.. code-block:: python
from datetime import date
from pprint import pprint
from marshmallow import Schema, fields
class ArtistSchema(Schema):
name = fields.Str()
class AlbumSchema(Schema):
title = fields.Str()
release_date = fields.Date()
artist = fields.Nested(ArtistSchema())
bowie = dict(name="David Bowie")
album = dict(artist=bowie, title="Hunky Dory", release_date=date(1971, 12, 17))
schema = AlbumSchema()
result = schema.dump(album)
pprint(result, indent=2)
# { 'artist': {'name': 'David Bowie'},
# 'release_date': '1971-12-17',
# 'title': 'Hunky Dory'}
In short, marshmallow schemas can be used to:
- **Validate** input data.
- **Deserialize** input data to app-level objects.
- **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.
Get it now
==========
.. code-block:: shell-session
$ pip install -U marshmallow
.. end elevator-pitch
Documentation
=============
Full documentation is available at https://marshmallow.readthedocs.io/ .
Ecosystem
=========
A list of marshmallow-related libraries can be found at the GitHub wiki here:
https://github.com/marshmallow-code/marshmallow/wiki/Ecosystem
Credits
=======
Contributors
------------
This project exists thanks to all the people who contribute.
**You're highly encouraged to participate in marshmallow's development.**
Check out the `Contributing Guidelines <https://marshmallow.readthedocs.io/en/latest/contributing.html>`_ to see how you can help.
Thank you to all who have already contributed to marshmallow!
.. image:: https://opencollective.com/marshmallow/contributors.svg?width=890&button=false
:target: https://marshmallow.readthedocs.io/en/latest/authors.html
:alt: Contributors
Backers
-------
If you find marshmallow useful, please consider supporting the team with
a donation. Your donation helps move marshmallow forward.
Thank you to all our backers! [`Become a backer`_]
.. _`Become a backer`: https://opencollective.com/marshmallow#backer
.. image:: https://opencollective.com/marshmallow/backers.svg?width=890
:target: https://opencollective.com/marshmallow#backers
:alt: Backers
Sponsors
--------
.. start sponsors
marshmallow is sponsored by `Route4Me <https://route4me.com>`_.
.. image:: https://github.com/user-attachments/assets/018c2e23-032e-4a11-98da-8b6dc25b9054
:target: https://route4me.com
:alt: Routing Planner
Support this project by becoming a sponsor (or ask your company to support this project by becoming a sponsor).
Your logo will be displayed here with a link to your website. [`Become a sponsor`_]
.. _`Become a sponsor`: https://opencollective.com/marshmallow#sponsor
.. end sponsors
Professional Support
====================
Professionally-supported marshmallow is now available through the
`Tidelift Subscription <https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=readme>`_.
Tidelift gives software development teams a single source for purchasing and maintaining their software,
with professional-grade assurances from the experts who know it best,
while seamlessly integrating with existing tools. [`Get professional support`_]
.. _`Get professional support`: https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=marshmallow&utm_medium=referral&utm_campaign=github
.. image:: https://user-images.githubusercontent.com/2379650/45126032-50b69880-b13f-11e8-9c2c-abd16c433495.png
:target: https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=readme
:alt: Get supported marshmallow with Tidelift
Project Links
=============
- Docs: https://marshmallow.readthedocs.io/
- Changelog: https://marshmallow.readthedocs.io/en/latest/changelog.html
- Contributing Guidelines: https://marshmallow.readthedocs.io/en/latest/contributing.html
- PyPI: https://pypi.org/project/marshmallow/
- Issues: https://github.com/marshmallow-code/marshmallow/issues
- Donate: https://opencollective.com/marshmallow
License
=======
MIT licensed. See the bundled `LICENSE <https://github.com/marshmallow-code/marshmallow/blob/dev/LICENSE>`_ file for more details.
Raw data
{
"_id": null,
"home_page": null,
"name": "marshmallow",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Steven Loria <sloria1@gmail.com>, J\u00e9r\u00f4me Lafr\u00e9choux <jerome@jolimont.fr>, Jared Deckard <jared@shademaps.com>",
"keywords": null,
"author": null,
"author_email": "Steven Loria <sloria1@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/b8/85/43b8e95251312e8d0d3389263e87e368a5a015db475e140d5dd8cb8dcb47/marshmallow-3.25.1.tar.gz",
"platform": null,
"description": "********************************************\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 <https://marshmallow.readthedocs.io/en/latest/contributing.html>`_ 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&button=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 <https://route4me.com>`_.\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 <https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=readme>`_.\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&utm_medium=referral&utm_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&utm_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 <https://github.com/marshmallow-code/marshmallow/blob/dev/LICENSE>`_ file for more details.\n\n",
"bugtrack_url": null,
"license": null,
"summary": "A lightweight library for converting complex datatypes to and from native Python datatypes.",
"version": "3.25.1",
"project_urls": {
"Changelog": "https://marshmallow.readthedocs.io/en/latest/changelog.html",
"Funding": "https://opencollective.com/marshmallow",
"Issues": "https://github.com/marshmallow-code/marshmallow/issues",
"Source": "https://github.com/marshmallow-code/marshmallow",
"Tidelift": "https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=pypi"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8e255b300f0400078d9783fbe44d30fedd849a130fc3aff01f18278c12342b6f",
"md5": "014296a4e8caaf746d950283119a3dfb",
"sha256": "ec5d00d873ce473b7f2ffcb7104286a376c354cab0c2fa12f5573dab03e87210"
},
"downloads": -1,
"filename": "marshmallow-3.25.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "014296a4e8caaf746d950283119a3dfb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 49624,
"upload_time": "2025-01-11T23:36:46",
"upload_time_iso_8601": "2025-01-11T23:36:46.258557Z",
"url": "https://files.pythonhosted.org/packages/8e/25/5b300f0400078d9783fbe44d30fedd849a130fc3aff01f18278c12342b6f/marshmallow-3.25.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b88543b8e95251312e8d0d3389263e87e368a5a015db475e140d5dd8cb8dcb47",
"md5": "0714da7f00520766aeb55fedc384b7e2",
"sha256": "f4debda3bb11153d81ac34b0d582bf23053055ee11e791b54b4b35493468040a"
},
"downloads": -1,
"filename": "marshmallow-3.25.1.tar.gz",
"has_sig": false,
"md5_digest": "0714da7f00520766aeb55fedc384b7e2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 217295,
"upload_time": "2025-01-11T23:36:48",
"upload_time_iso_8601": "2025-01-11T23:36:48.442157Z",
"url": "https://files.pythonhosted.org/packages/b8/85/43b8e95251312e8d0d3389263e87e368a5a015db475e140d5dd8cb8dcb47/marshmallow-3.25.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-11 23:36:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "marshmallow-code",
"github_project": "marshmallow",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "marshmallow"
}