Skip to main content

marshmallow-objects

Test Codecov Version Black

Marshmallow Objects and Models

Serializing/Deserializing Python objects using Marshmallow library.

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

$ pip install -U marshmallow-objects

Project Links

License

MIT licensed. See the bundled LICENSE file for more details.

Release files for marshmallow-objects 2.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for marshmallow-objects 2.3.0
File Size Uploaded
marshmallow-objects-2.3.0.tar.gz 17.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for marshmallow-objects 2.3.0
File Interpreter ABI Platform
marshmallow_objects-2.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / marshmallow-objects-2.3.0.tar.gz

Download URL marshmallow-objects-2.3.0.tar.gz
Size 17.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b2652695375f1637a06cbaef3f4d6d1ab096c3bb7c0450d0bbce84f114776021
BLAKE2b-256 checksum
How to use checksums
c8d36d045a7d0436ede60ce7328a1a261b0c517dc36c49a6785559f3e43bb7f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release files / marshmallow_objects-2.3.0-py3-none-any.whl

Download URL marshmallow_objects-2.3.0-py3-none-any.whl
Size 6.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
194872176f821605444da038f759a09d1cb60e0e3562f7dcb85ee502294cec94
BLAKE2b-256 checksum
How to use checksums
2186980ff71e08c27390c155f92561d2640cc3a44fa33ecff4e450cda8eeb1fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

Release history Release notifications | RSS feed

This release

2.3.0 This release

2 release files

2.2.3

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.19

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page