Skip to main content
https://travis-ci.org/onyg/aserializer.png?branch=master https://img.shields.io/coveralls/onyg/aserializer/master.svg pypi

About

aserializer is an object serializer inspired by the django forms.

Examples

Examples how code looks like:

class Address(Serializer):
    id = IntegerField(required=True, identity=True)
    street = StringField(required=True)
    streetNumber = StringField(required=True)
    city = StringField(required=False)
    country = StringField(required=False)

class User(Serializer):
    _type = TypeField('user')
    id = IntegerField(required=True, identity=True)
    name = StringField(required=True)
    email = EmailField(required=True)
    tel = StringField(required=False, min_length=10, max_length=50)
    address = SerializerField(Address, required=True)

Result:

user = User(DATA)
user.dump()

{
  "_type": "user",
  "id": 1,
  "name": "Joe",
  "email": "joe@example.com",
  "tel": "+49 555 555 12",
  "address": {
    "id": 1,
    "street": "Street",
    "streetNumber": "5a",
    "city": "Berlin",
    "country": "Germany"
  }
}

Tests

To run the tests use the command: python setup.py nosetests

Contributing

Please find bugs and send pull requests to the GitHub repository and issue tracker.

Metadata

Release files for aserializer 0.8.1

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

Source distribution (sdist)

Source distribution for aserializer 0.8.1
File Size Uploaded
aserializer-0.8.1.tar.gz 18.3 kB Details

Release files / aserializer-0.8.1.tar.gz

Download URL aserializer-0.8.1.tar.gz
Size 18.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a6ca2aa83318523de9414d8f3d720bef68847277cf5fa8ed8ce423dfbe78c9cb
BLAKE2b-256 checksum
How to use checksums
d4596333bf85b3459c919e1c2660b06642110a0bf405fb386efbe7fcb4a0eb4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.8.1 This release

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.9

1 release file

0.6.8

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.3

1 release file

0.6.2

1 release file

0.6.1

1 release file

0.6

1 release file

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