semvec/pypi-packages huggingface dataset:
databind2 4.2.2
Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. The `databind` package will install the full suite of databind packages. Compatible with Python 3.7 and newer.
License: MIT
Requires Python: >=3.6.3,<4.0.0

# databind

__Compatibility__: Python 3.6.3+

Databind is a library inspired by jackson-databind to de-/serialise Python dataclasses.

If you install the `databind` package, you will get the respective version of the
following packages:

* [databind.core](https://pypi.org/project/databind.core/) &ndash; Provides the core framework.
* [databind.json](https://pypi.org/project/databind.json/) &ndash; De-/serialize dataclasses to/from JSON payloads.

## Supported features

| Feature | Python version | Databind version |
| ------- | -------------- | ---------------- |
| [PEP585](https://www.python.org/dev/peps/pep-0585/) | 3.9 | 1.2.0 &ndash; *current* |
| [PEP585](https://www.python.org/dev/peps/pep-0585/) (forward references) | 3.9 | 1.3.1? &ndash; *current* |
| Resolve type parameters of specialised generic types | 3.x | 1.5.0 &ndash; *current* |
| `typing.TypedDict` | 3.x | 2.0.0 &ndash; *current* |
| Concretise type variables in parametrised generics | 3.x | 2.0.0 &ndash; *current* |

---

<p align="center">Copyright &copy; 2022 &ndash; Niklas Rosenstein</p>
databind-core2 4.2.2
Databind is a library inspired by jackson-databind to de-/serialize Python dataclasses. Compatible with Python 3.7 and newer.
License: MIT
Requires Python: >=3.6.3,<4.0.0

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