Metadata-Version: 2.1
Name: databind-core2
Version: 4.2.2
Summary: Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.7 and newer.
License: MIT
Author: Niklas Rosenstein
Author-email: rosensteinniklas@gmail.com
Requires-Python: >=3.6.3,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: Deprecated (>=1.2.12,<2.0.0)
Requires-Dist: nr-date (>=2.0.0,<3.0.0)
Requires-Dist: nr-stream (>=1.0.0,<2.0.0)
Requires-Dist: typeapi (>=1.2.1,<2.0.0)
Requires-Dist: typing-extensions (>=3.10.0)
Project-URL: Bug Tracker, https://github.com/NiklasRosenstein/python-databind/issues
Project-URL: Documentation, https://niklasrosenstein.github.io/python-databind/
Project-URL: Repository, https://github.com/NiklasRosenstein/python-databind
Description-Content-Type: text/markdown

# 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

* [databind.json](https://pypi.org/project/databind.json)

### 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.

```py
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'))
```

---

<p align="center">Copyright &copy; 2020 &ndash; Niklas Rosenstein</p>

