%global _empty_manifest_terminate_build 0 Name: python-marshmallow-objects Version: 2.3.0 Release: 1 Summary: Marshmallow Objects and Models License: MIT License URL: https://github.com/sv-tools/marshmallow-objects Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c8/d3/6d045a7d0436ede60ce7328a1a261b0c517dc36c49a6785559f3e43bb7f8/marshmallow-objects-2.3.0.tar.gz BuildArch: noarch Requires: python3-marshmallow %description # marshmallow-objects [![Test](https://img.shields.io/github/workflow/status/sv-tools/marshmallow-objects/Test%20Master%20Branch)](https://github.com/sv-tools/marshmallow-objects/actions?query=workflow%3A%22Test+Master+Branch%22) [![Codecov](https://img.shields.io/codecov/c/github/sv-tools/marshmallow-objects)](https://codecov.io/gh/sv-tools/marshmallow-objects) [![Version](https://img.shields.io/pypi/v/marshmallow-objects?label=version)](https://pypi.org/project/marshmallow-objects/) [![Black](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black) ## Marshmallow Objects and Models Serializing/Deserializing Python objects using [Marshmallow](https://github.com/marshmallow-code/marshmallow) library. ```python import marshmallow_objects as marshmallow class Artist(marshmallow.Model): name = marshmallow.fields.Str() class Album(marshmallow.Model): title = marshmallow.fields.Str() release_date = marshmallow.fields.Date() artist = marshmallow.NestedModel(Artist) bowie_raw = dict(name='David Bowie') album_raw = dict(artist=bowie_raw, title='Hunky Dory', release_date='1971-12-17') album = Album(**album_raw) print(album.title) print(album.release_date) print(album.artist.name) # Hunky Dory # 1971-12-17 # David Bowie ``` ## Get It Now ```bash $ pip install -U marshmallow-objects ``` ## Project Links * [Marshmallow](https://github.com/marshmallow-code/marshmallow) * [PyPi](https://pypi.python.org/pypi/marshmallow-objects) * [Cookbook](https://github.com/sv-tools/marshmallow-objects/wiki) ## License MIT licensed. See the bundled [LICENSE](LICENSE) file for more details. %package -n python3-marshmallow-objects Summary: Marshmallow Objects and Models Provides: python-marshmallow-objects BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip %description -n python3-marshmallow-objects # marshmallow-objects [![Test](https://img.shields.io/github/workflow/status/sv-tools/marshmallow-objects/Test%20Master%20Branch)](https://github.com/sv-tools/marshmallow-objects/actions?query=workflow%3A%22Test+Master+Branch%22) [![Codecov](https://img.shields.io/codecov/c/github/sv-tools/marshmallow-objects)](https://codecov.io/gh/sv-tools/marshmallow-objects) [![Version](https://img.shields.io/pypi/v/marshmallow-objects?label=version)](https://pypi.org/project/marshmallow-objects/) [![Black](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black) ## Marshmallow Objects and Models Serializing/Deserializing Python objects using [Marshmallow](https://github.com/marshmallow-code/marshmallow) library. ```python import marshmallow_objects as marshmallow class Artist(marshmallow.Model): name = marshmallow.fields.Str() class Album(marshmallow.Model): title = marshmallow.fields.Str() release_date = marshmallow.fields.Date() artist = marshmallow.NestedModel(Artist) bowie_raw = dict(name='David Bowie') album_raw = dict(artist=bowie_raw, title='Hunky Dory', release_date='1971-12-17') album = Album(**album_raw) print(album.title) print(album.release_date) print(album.artist.name) # Hunky Dory # 1971-12-17 # David Bowie ``` ## Get It Now ```bash $ pip install -U marshmallow-objects ``` ## Project Links * [Marshmallow](https://github.com/marshmallow-code/marshmallow) * [PyPi](https://pypi.python.org/pypi/marshmallow-objects) * [Cookbook](https://github.com/sv-tools/marshmallow-objects/wiki) ## License MIT licensed. See the bundled [LICENSE](LICENSE) file for more details. %package help Summary: Development documents and examples for marshmallow-objects Provides: python3-marshmallow-objects-doc %description help # marshmallow-objects [![Test](https://img.shields.io/github/workflow/status/sv-tools/marshmallow-objects/Test%20Master%20Branch)](https://github.com/sv-tools/marshmallow-objects/actions?query=workflow%3A%22Test+Master+Branch%22) [![Codecov](https://img.shields.io/codecov/c/github/sv-tools/marshmallow-objects)](https://codecov.io/gh/sv-tools/marshmallow-objects) [![Version](https://img.shields.io/pypi/v/marshmallow-objects?label=version)](https://pypi.org/project/marshmallow-objects/) [![Black](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black) ## Marshmallow Objects and Models Serializing/Deserializing Python objects using [Marshmallow](https://github.com/marshmallow-code/marshmallow) library. ```python import marshmallow_objects as marshmallow class Artist(marshmallow.Model): name = marshmallow.fields.Str() class Album(marshmallow.Model): title = marshmallow.fields.Str() release_date = marshmallow.fields.Date() artist = marshmallow.NestedModel(Artist) bowie_raw = dict(name='David Bowie') album_raw = dict(artist=bowie_raw, title='Hunky Dory', release_date='1971-12-17') album = Album(**album_raw) print(album.title) print(album.release_date) print(album.artist.name) # Hunky Dory # 1971-12-17 # David Bowie ``` ## Get It Now ```bash $ pip install -U marshmallow-objects ``` ## Project Links * [Marshmallow](https://github.com/marshmallow-code/marshmallow) * [PyPi](https://pypi.python.org/pypi/marshmallow-objects) * [Cookbook](https://github.com/sv-tools/marshmallow-objects/wiki) ## License MIT licensed. See the bundled [LICENSE](LICENSE) file for more details. %prep %autosetup -n marshmallow-objects-2.3.0 %build %py3_build %install %py3_install install -d -m755 %{buildroot}/%{_pkgdocdir} if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi pushd %{buildroot} if [ -d usr/lib ]; then find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/lib64 ]; then find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . %files -n python3-marshmallow-objects -f filelist.lst %dir %{python3_sitelib}/* %files help -f doclist.lst %{_docdir}/* %changelog * Wed Apr 12 2023 Python_Bot - 2.3.0-1 - Package Spec generated