diff options
author | CoprDistGit <infra@openeuler.org> | 2023-04-12 02:09:23 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-04-12 02:09:23 +0000 |
commit | 3bb0b47aac7bec75387ba220aa3546e54b8b82c1 (patch) | |
tree | 7984477a17ba66563dbab3506e2df462588b65b6 | |
parent | 1e87da55e5b0e4b57dbab997d27ab403299642d5 (diff) |
automatic import of python-marshmallow-objects
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-marshmallow-objects.spec | 244 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 246 insertions, 0 deletions
@@ -0,0 +1 @@ +/marshmallow-objects-2.3.0.tar.gz diff --git a/python-marshmallow-objects.spec b/python-marshmallow-objects.spec new file mode 100644 index 0000000..b5fa4b9 --- /dev/null +++ b/python-marshmallow-objects.spec @@ -0,0 +1,244 @@ +%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 + +[](https://github.com/sv-tools/marshmallow-objects/actions?query=workflow%3A%22Test+Master+Branch%22) +[](https://codecov.io/gh/sv-tools/marshmallow-objects) +[](https://pypi.org/project/marshmallow-objects/) +[](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 + +[](https://github.com/sv-tools/marshmallow-objects/actions?query=workflow%3A%22Test+Master+Branch%22) +[](https://codecov.io/gh/sv-tools/marshmallow-objects) +[](https://pypi.org/project/marshmallow-objects/) +[](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 + +[](https://github.com/sv-tools/marshmallow-objects/actions?query=workflow%3A%22Test+Master+Branch%22) +[](https://codecov.io/gh/sv-tools/marshmallow-objects) +[](https://pypi.org/project/marshmallow-objects/) +[](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 <Python_Bot@openeuler.org> - 2.3.0-1 +- Package Spec generated @@ -0,0 +1 @@ +c1571da0abd816c18011f1a4d49e0d62 marshmallow-objects-2.3.0.tar.gz |