METADATA 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  1. Metadata-Version: 2.3
  2. Name: marshmallow
  3. Version: 3.26.1
  4. Summary: A lightweight library for converting complex datatypes to and from native Python datatypes.
  5. Author-email: Steven Loria <sloria1@gmail.com>
  6. Maintainer-email: Steven Loria <sloria1@gmail.com>, Jérôme Lafréchoux <jerome@jolimont.fr>, Jared Deckard <jared@shademaps.com>
  7. Requires-Python: >=3.9
  8. Description-Content-Type: text/x-rst
  9. Classifier: Development Status :: 5 - Production/Stable
  10. Classifier: Intended Audience :: Developers
  11. Classifier: License :: OSI Approved :: MIT License
  12. Classifier: Programming Language :: Python :: 3
  13. Classifier: Programming Language :: Python :: 3.9
  14. Classifier: Programming Language :: Python :: 3.10
  15. Classifier: Programming Language :: Python :: 3.11
  16. Classifier: Programming Language :: Python :: 3.12
  17. Classifier: Programming Language :: Python :: 3.13
  18. Requires-Dist: packaging>=17.0
  19. Requires-Dist: marshmallow[tests] ; extra == "dev"
  20. Requires-Dist: tox ; extra == "dev"
  21. Requires-Dist: pre-commit>=3.5,<5.0 ; extra == "dev"
  22. Requires-Dist: autodocsumm==0.2.14 ; extra == "docs"
  23. Requires-Dist: furo==2024.8.6 ; extra == "docs"
  24. Requires-Dist: sphinx-copybutton==0.5.2 ; extra == "docs"
  25. Requires-Dist: sphinx-issues==5.0.0 ; extra == "docs"
  26. Requires-Dist: sphinx==8.1.3 ; extra == "docs"
  27. Requires-Dist: sphinxext-opengraph==0.9.1 ; extra == "docs"
  28. Requires-Dist: pytest ; extra == "tests"
  29. Requires-Dist: simplejson ; extra == "tests"
  30. Project-URL: Changelog, https://marshmallow.readthedocs.io/en/latest/changelog.html
  31. Project-URL: Funding, https://opencollective.com/marshmallow
  32. Project-URL: Issues, https://github.com/marshmallow-code/marshmallow/issues
  33. Project-URL: Source, https://github.com/marshmallow-code/marshmallow
  34. Project-URL: Tidelift, https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=pypi
  35. Provides-Extra: dev
  36. Provides-Extra: docs
  37. Provides-Extra: tests
  38. ********************************************
  39. marshmallow: simplified object serialization
  40. ********************************************
  41. |pypi| |build-status| |pre-commit| |docs|
  42. .. |pypi| image:: https://badgen.net/pypi/v/marshmallow
  43. :target: https://pypi.org/project/marshmallow/
  44. :alt: Latest version
  45. .. |build-status| image:: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml/badge.svg
  46. :target: https://github.com/marshmallow-code/marshmallow/actions/workflows/build-release.yml
  47. :alt: Build status
  48. .. |pre-commit| image:: https://results.pre-commit.ci/badge/github/marshmallow-code/marshmallow/dev.svg
  49. :target: https://results.pre-commit.ci/latest/github/marshmallow-code/marshmallow/dev
  50. :alt: pre-commit.ci status
  51. .. |docs| image:: https://readthedocs.org/projects/marshmallow/badge/
  52. :target: https://marshmallow.readthedocs.io/
  53. :alt: Documentation
  54. .. start elevator-pitch
  55. **marshmallow** is an ORM/ODM/framework-agnostic library for converting complex datatypes, such as objects, to and from native Python datatypes.
  56. .. code-block:: python
  57. from datetime import date
  58. from pprint import pprint
  59. from marshmallow import Schema, fields
  60. class ArtistSchema(Schema):
  61. name = fields.Str()
  62. class AlbumSchema(Schema):
  63. title = fields.Str()
  64. release_date = fields.Date()
  65. artist = fields.Nested(ArtistSchema())
  66. bowie = dict(name="David Bowie")
  67. album = dict(artist=bowie, title="Hunky Dory", release_date=date(1971, 12, 17))
  68. schema = AlbumSchema()
  69. result = schema.dump(album)
  70. pprint(result, indent=2)
  71. # { 'artist': {'name': 'David Bowie'},
  72. # 'release_date': '1971-12-17',
  73. # 'title': 'Hunky Dory'}
  74. In short, marshmallow schemas can be used to:
  75. - **Validate** input data.
  76. - **Deserialize** input data to app-level objects.
  77. - **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.
  78. Get it now
  79. ==========
  80. .. code-block:: shell-session
  81. $ pip install -U marshmallow
  82. .. end elevator-pitch
  83. Documentation
  84. =============
  85. Full documentation is available at https://marshmallow.readthedocs.io/ .
  86. Ecosystem
  87. =========
  88. A list of marshmallow-related libraries can be found at the GitHub wiki here:
  89. https://github.com/marshmallow-code/marshmallow/wiki/Ecosystem
  90. Credits
  91. =======
  92. Contributors
  93. ------------
  94. This project exists thanks to all the people who contribute.
  95. **You're highly encouraged to participate in marshmallow's development.**
  96. Check out the `Contributing Guidelines <https://marshmallow.readthedocs.io/en/latest/contributing.html>`_ to see how you can help.
  97. Thank you to all who have already contributed to marshmallow!
  98. .. image:: https://opencollective.com/marshmallow/contributors.svg?width=890&button=false
  99. :target: https://marshmallow.readthedocs.io/en/latest/authors.html
  100. :alt: Contributors
  101. Backers
  102. -------
  103. If you find marshmallow useful, please consider supporting the team with
  104. a donation. Your donation helps move marshmallow forward.
  105. Thank you to all our backers! [`Become a backer`_]
  106. .. _`Become a backer`: https://opencollective.com/marshmallow#backer
  107. .. image:: https://opencollective.com/marshmallow/backers.svg?width=890
  108. :target: https://opencollective.com/marshmallow#backers
  109. :alt: Backers
  110. Sponsors
  111. --------
  112. .. start sponsors
  113. marshmallow is sponsored by `Route4Me <https://route4me.com>`_.
  114. .. image:: https://github.com/user-attachments/assets/018c2e23-032e-4a11-98da-8b6dc25b9054
  115. :target: https://route4me.com
  116. :alt: Routing Planner
  117. Support this project by becoming a sponsor (or ask your company to support this project by becoming a sponsor).
  118. Your logo will be displayed here with a link to your website. [`Become a sponsor`_]
  119. .. _`Become a sponsor`: https://opencollective.com/marshmallow#sponsor
  120. .. end sponsors
  121. Professional Support
  122. ====================
  123. Professionally-supported marshmallow is now available through the
  124. `Tidelift Subscription <https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=readme>`_.
  125. Tidelift gives software development teams a single source for purchasing and maintaining their software,
  126. with professional-grade assurances from the experts who know it best,
  127. while seamlessly integrating with existing tools. [`Get professional support`_]
  128. .. _`Get professional support`: https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=marshmallow&utm_medium=referral&utm_campaign=github
  129. .. image:: https://user-images.githubusercontent.com/2379650/45126032-50b69880-b13f-11e8-9c2c-abd16c433495.png
  130. :target: https://tidelift.com/subscription/pkg/pypi-marshmallow?utm_source=pypi-marshmallow&utm_medium=readme
  131. :alt: Get supported marshmallow with Tidelift
  132. Project Links
  133. =============
  134. - Docs: https://marshmallow.readthedocs.io/
  135. - Changelog: https://marshmallow.readthedocs.io/en/latest/changelog.html
  136. - Contributing Guidelines: https://marshmallow.readthedocs.io/en/latest/contributing.html
  137. - PyPI: https://pypi.org/project/marshmallow/
  138. - Issues: https://github.com/marshmallow-code/marshmallow/issues
  139. - Donate: https://opencollective.com/marshmallow
  140. License
  141. =======
  142. MIT licensed. See the bundled `LICENSE <https://github.com/marshmallow-code/marshmallow/blob/dev/LICENSE>`_ file for more details.