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-4.2.3.tar.gz (23.7 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-4.2.3-py3-none-any.whl (27.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: databind.core-4.2.3.tar.gz
  • Upload date:
  • Size: 23.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

File hashes

Hashes for databind.core-4.2.3.tar.gz
Algorithm Hash digest
SHA256 637e556b7e24a8f28c832f4ca9daaf9d13163a6efe15ea25654b980aabc977e1
MD5 69ac099b48b6904337e36463cc1ca1e3
BLAKE2b-256 5c842691fcb3b808685091126bdb5e794a650a7f441a62cf5f99cf5fc6a98f66

See more details on using hashes here.

File details

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

File metadata

  • Download URL: databind.core-4.2.3-py3-none-any.whl
  • Upload date:
  • Size: 27.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/37.3 requests/2.28.2 requests-toolbelt/0.10.1 urllib3/1.26.14 tqdm/4.64.1 importlib-metadata/6.0.0 keyring/23.13.1 rfc3986/2.0.0 colorama/0.4.6 CPython/3.10.9

File hashes

Hashes for databind.core-4.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f42545c175dd5350a8d96b1e125d7afa38e2ab110a9eb44777008547f532fe39
MD5 ca22c47ea6b4eb300f55447f59ba2a48
BLAKE2b-256 d9610b68ed9c805a2fdc036f0d127dfad0281569ef045fb7acf8164ec08d8689

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