Skip to main content

Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.7 and newer.

Project description

databind.core

databind.core provides a jackson-databind inspired framework for data de-/serialization in Python. Unless you are looking to implement support for de-/serializing new data formats, the databind.core package alone might not be what you are looking for (unless you want to use databind.core.dataclasses as a drop-in replacement to the standard library dataclasses module, for that check out the section at the bottom).

Known implementations

Dataclass extension

The standard library dataclasses module does not allow to define non-default arguments after default arguments. You can use databind.core.dataclasses as a drop-in replacement to get this feature. It behaves exactly like the standard library, only that non-default arguments may follow default arguments. Such arguments can be passed to the constructor as positional or keyword arguments.

from databind.core import dataclasses

@dataclasses.dataclass
class A:
  value1: int = 42

@dataclasses.dataclass
class B(A):
  value2: str

print(B(0, 'Hello, World!'))
print(B(value2='Answer to the universe'))

Copyright © 2020 – Niklas Rosenstein

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

databind.core-2.0.0.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

databind.core-2.0.0-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file databind.core-2.0.0.tar.gz.

File metadata

  • Download URL: databind.core-2.0.0.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for databind.core-2.0.0.tar.gz
Algorithm Hash digest
SHA256 7e3765ac51b84fccdf45bc1ed4da7f6f69a07088206fb047885d6464292836be
MD5 9be66608b0efc8096ae8288962725bf4
BLAKE2b-256 c46ca363377c8c47b4d121393268169fac93d87bb5588c0553577b631bb234a3

See more details on using hashes here.

File details

Details for the file databind.core-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: databind.core-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.1 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for databind.core-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4388d158869eedb2ef17a4a4e9798683950a0e7d7db5601020cc9f88ecd1af71
MD5 47eb61708e14847b9bfedae601d9fdb4
BLAKE2b-256 5367ccd08d3a9b8bbb1fd0bd715b93bd08ce42fa5c5d23e4ec23eacbb1b950ae

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page