marshmallow-objects


Namemarshmallow-objects JSON
Version 2.3.0 PyPI version JSON
download
home_pagehttps://github.com/sv-tools/marshmallow-objects
SummaryMarshmallow Objects and Models
upload_time2020-07-09 13:29:29
maintainer
docs_urlNone
authorSergey Vilgelm
requires_python
licenseMIT License
keywords marshmallow objects models yaml json ini config parser
VCS
bugtrack_url
requirements marshmallow
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.




            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sv-tools/marshmallow-objects",
    "name": "marshmallow-objects",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "marshmallow objects models yaml json ini config parser",
    "author": "Sergey Vilgelm",
    "author_email": "sergey@vilgelm.info",
    "download_url": "https://files.pythonhosted.org/packages/c8/d3/6d045a7d0436ede60ce7328a1a261b0c517dc36c49a6785559f3e43bb7f8/marshmallow-objects-2.3.0.tar.gz",
    "platform": "",
    "description": "# marshmallow-objects\n\n[![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)\n[![Codecov](https://img.shields.io/codecov/c/github/sv-tools/marshmallow-objects)](https://codecov.io/gh/sv-tools/marshmallow-objects)\n[![Version](https://img.shields.io/pypi/v/marshmallow-objects?label=version)](https://pypi.org/project/marshmallow-objects/)\n[![Black](https://img.shields.io/badge/code%20style-black-black)](https://github.com/psf/black)\n\n## Marshmallow Objects and Models\n\nSerializing/Deserializing Python objects using [Marshmallow](https://github.com/marshmallow-code/marshmallow) library.\n\n```python\nimport marshmallow_objects as marshmallow\n\n\nclass Artist(marshmallow.Model):\n    name = marshmallow.fields.Str()\n\n\nclass Album(marshmallow.Model):\n    title = marshmallow.fields.Str()\n    release_date = marshmallow.fields.Date()\n    artist = marshmallow.NestedModel(Artist)\n\n\nbowie_raw = dict(name='David Bowie')\nalbum_raw = dict(artist=bowie_raw, title='Hunky Dory',\n                 release_date='1971-12-17')\n\nalbum = Album(**album_raw)\nprint(album.title)\nprint(album.release_date)\nprint(album.artist.name)\n\n# Hunky Dory\n# 1971-12-17\n# David Bowie\n```\n\n## Get It Now\n\n```bash\n$ pip install -U marshmallow-objects\n```\n\n## Project Links\n\n* [Marshmallow](https://github.com/marshmallow-code/marshmallow)\n* [PyPi](https://pypi.python.org/pypi/marshmallow-objects)\n* [Cookbook](https://github.com/sv-tools/marshmallow-objects/wiki)\n\n## License\n\nMIT licensed. See the bundled [LICENSE](LICENSE) file for more details.\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Marshmallow Objects and Models",
    "version": "2.3.0",
    "split_keywords": [
        "marshmallow",
        "objects",
        "models",
        "yaml",
        "json",
        "ini",
        "config",
        "parser"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "161392d497203cb25baffa1133426698",
                "sha256": "194872176f821605444da038f759a09d1cb60e0e3562f7dcb85ee502294cec94"
            },
            "downloads": -1,
            "filename": "marshmallow_objects-2.3.0-py3-none-any.whl",
            "has_sig": true,
            "md5_digest": "161392d497203cb25baffa1133426698",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6671,
            "upload_time": "2020-07-09T13:29:27",
            "upload_time_iso_8601": "2020-07-09T13:29:27.890780Z",
            "url": "https://files.pythonhosted.org/packages/21/86/980ff71e08c27390c155f92561d2640cc3a44fa33ecff4e450cda8eeb1fd/marshmallow_objects-2.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "c1571da0abd816c18011f1a4d49e0d62",
                "sha256": "b2652695375f1637a06cbaef3f4d6d1ab096c3bb7c0450d0bbce84f114776021"
            },
            "downloads": -1,
            "filename": "marshmallow-objects-2.3.0.tar.gz",
            "has_sig": true,
            "md5_digest": "c1571da0abd816c18011f1a4d49e0d62",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 17657,
            "upload_time": "2020-07-09T13:29:29",
            "upload_time_iso_8601": "2020-07-09T13:29:29.097464Z",
            "url": "https://files.pythonhosted.org/packages/c8/d3/6d045a7d0436ede60ce7328a1a261b0c517dc36c49a6785559f3e43bb7f8/marshmallow-objects-2.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2020-07-09 13:29:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "sv-tools",
    "github_project": "marshmallow-objects",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "marshmallow",
            "specs": [
                [
                    ">=",
                    "3.0.0"
                ]
            ]
        }
    ],
    "lcname": "marshmallow-objects"
}
        
Elapsed time: 0.02189s