Skip to main content
from pyseri import serializer

class A():
	name = 'class a'

class B():
	name = 'class b'
	a = [A(), A(), A()]

serializer.dump(B(), mapper={'A': {'name'}, 'B':{'name', 'a'}})

#output
"""
{
	'name': 'class b',
	'a': [
		{'name': 'class a'}, 
		{'name': 'class a'},
		 {'name': 'class a'}
	 ]
}
"""
from pyseri import serializer

class A():
	getters = ['name']
	#this key is important
	name = 'class a'

class B():
	getters = ['name', 'a']
	#this key is important
	name = 'class b'
	a = [A(), A(), A()]

serializer.dump(B())

#output
"""
{
	'a': [
		{'name': 'class a'}, 
		{'name': 'class a'}, 
		{'name': 'class a'}
	],
	'name': 'class b'}
"""

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyseri-1.1.1.tar.gz (1.2 kB view details)

Uploaded Source

File details

Details for the file pyseri-1.1.1.tar.gz.

File metadata

  • Download URL: pyseri-1.1.1.tar.gz
  • Upload date:
  • Size: 1.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for pyseri-1.1.1.tar.gz
Algorithm Hash digest
SHA256 07c7bfdb87394d23d5003d7427959ec9f158ea5cc43bc25a9ad9166d5f75404b
MD5 316e96d499a96a1b474cecc595bfd5ee
BLAKE2b-256 54b00212df577223cad903d809251e93858aaa7968cb50919afa17679f9ee3ae

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 file

1.1.0

1 file

1.0.6

1 file

1.0.5

1 file

1.0.4

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

1 file

0.1.0

1 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