{"id":37079261,"url":"https://github.com/mathewmarcus/marshmallow-pynamodb","last_synced_at":"2026-01-14T09:35:43.479Z","repository":{"id":50201311,"uuid":"81021749","full_name":"mathewmarcus/marshmallow-pynamodb","owner":"mathewmarcus","description":"PynamoDB integration with marshmallow","archived":false,"fork":false,"pushed_at":"2021-06-01T22:53:30.000Z","size":52,"stargazers_count":9,"open_issues_count":7,"forks_count":6,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-25T01:22:05.848Z","etag":null,"topics":["api","dynamodb","json","marshmallow","nosql","pynamodb","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathewmarcus.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-05T20:59:45.000Z","updated_at":"2021-07-07T10:21:57.000Z","dependencies_parsed_at":"2022-08-03T22:00:17.992Z","dependency_job_id":null,"html_url":"https://github.com/mathewmarcus/marshmallow-pynamodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mathewmarcus/marshmallow-pynamodb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewmarcus%2Fmarshmallow-pynamodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewmarcus%2Fmarshmallow-pynamodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewmarcus%2Fmarshmallow-pynamodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewmarcus%2Fmarshmallow-pynamodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathewmarcus","download_url":"https://codeload.github.com/mathewmarcus/marshmallow-pynamodb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathewmarcus%2Fmarshmallow-pynamodb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","dynamodb","json","marshmallow","nosql","pynamodb","python"],"created_at":"2026-01-14T09:35:42.847Z","updated_at":"2026-01-14T09:35:43.473Z","avatar_url":"https://github.com/mathewmarcus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"====================\nmarshmallow-pynamodb\n====================\n.. image:: https://badge.fury.io/py/marshmallow-pynamodb.svg\n    :target: http://badge.fury.io/py/marshmallow-pynamodb\n    :alt: Latest version\n.. image:: https://travis-ci.org/mathewmarcus/marshmallow-pynamodb.svg?branch=master\n    :target: https://travis-ci.org/mathewmarcus/marshmallow-pynamodb\n    :alt: Travis-CI\n\n`PynamoDB \u003chttps://pynamodb.readthedocs.io/en/latest/\u003e`_ integration with the  `marshmallow \u003chttps://marshmallow.readthedocs.io/en/latest/\u003e`_ (de)serialization library.\n\nInstallation\n============\nFrom PyPi::\n\n    $ pip install marshmallow-pynamodb\n\nFrom GitHub::\n\n    $ pip install git+https://github.com/mathewmarcus/marshmallow-pynamodb#egg=marshmallow_pynamodb\n\nDeclare your models\n===================\n\n.. code-block:: python\n\n    from pynamodb.models import Model\n    from pynamodb.attributes import UnicodeAttribute\n\n    class User(Model):\n        class Meta:\n            table_name = \"user\"\n        email = UnicodeAttribute(null=True)\n        first_name = UnicodeAttribute(range_key=True)\n        last_name = UnicodeAttribute(hash_key=True)\n\nGenerate marshmallow schemas\n============================\n\n.. code-block:: python\n\n    from marshmallow_pynamodb import ModelSchema\n\n    class UserSchema(ModelSchema):\n        class Meta:\n            model = User\n\n    user_schema = UserSchema()\n\n\n(De)serialize your data\n=======================\n\n.. code-block:: python\n\n    user = User(last_name=\"Smith\", first_name=\"John\")\n\n    user_schema.dump(user).data\n    # {u'first_name': u'John', u'last_name': u'Smith', u'email': None}\n\n    user_schema.load({\"last_name\": \"Smith\", \"first_name\": \"John\"}).data\n    # user\u003cSmith\u003e\n\n\nNested models? No problem\n=========================\n\n.. code-block:: python\n\n    from marshmallow_pynamodb.schema import ModelSchema\n\n    from pynamodb.models import Model\n    from pynamodb.attributes import ListAttribute, MapAttribute, NumberAttribute, UnicodeAttribute\n\n    class Location(MapAttribute):\n        latitude = NumberAttribute()\n        longitude = NumberAttribute()\n        name = UnicodeAttribute()\n\n\n    class Person(MapAttribute):\n        firstName = UnicodeAttribute()\n        lastName = UnicodeAttribute()\n        age = NumberAttribute()\n\n\n    class OfficeEmployeeMap(MapAttribute):\n        office_employee_id = NumberAttribute()\n        person = Person()\n        office_location = Location()\n\n\n    class Office(Model):\n        class Meta:\n            table_name = 'OfficeModel'\n\n        office_id = NumberAttribute(hash_key=True)\n        address = Location()\n        employees = ListAttribute(of=OfficeEmployeeMap)\n\n\n    class OfficeSchema(ModelSchema):\n        class Meta:\n            model = Office\n\n\n    OfficeSchema().load({'office_id': 789,\n                         'address': {'latitude': 6.98454,\n                                     'longitude': 172.38832,\n                                     'name': 'some_location'},\n                         'employees': [{'office_employee_id': 123,\n                                        'person': {'firstName': 'John',\n                                                   'lastName': 'Smith',\n                                                   'age': 45},\n                                        'office_location': {'latitude': -24.0853,\n                                                            'longitude': 144.87660,\n                                                            'name': 'other_location'}},\n                                       {'office_employee_id': 456,\n                                        'person': {'firstName': 'Jane',\n                                                   'lastName': 'Doe',\n                                                   'age': 33},\n                                        'office_location': {'latitude': -20.57989,\n                                                            'longitude': 92.30463,\n                                                            'name': 'yal'}}]}).data\n    # Office\u003c789\u003e\n\n\nLicense\n=======\n\nMIT licensed. See the bundled `LICENSE \u003chttps://github.com/mathewmarcus/marshmallow-pynamodb/blob/master/LICENSE.txt\u003e`_ file for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathewmarcus%2Fmarshmallow-pynamodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathewmarcus%2Fmarshmallow-pynamodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathewmarcus%2Fmarshmallow-pynamodb/lists"}