pane
pane is a modern Python library for dataclasses and data conversion, aiming
for speed and expressiveness.
pane draws heavy inspiration from Pydantic (among others), but its goals
are quite different. For example, pane has first-class conversion to and from
all JSON datatypes, not just mappings (and no 'root' hacks necessary).
In this sense pane is a library for general data conversion & validation,
while Pydantic is a dataclass-first library. In addition, pane is stricter
than Pydantic in several cases. For instance, pane will not attempt to coerce
3.14 or "3" to an integer.
pane is designed to be used to create complex declarative configuration languages
in formats like JSON, TOML, and YAML. This requires full support for complex, nested
types like t.Union[int, t.Tuple[int, str], list[int]]. It also requires
useful error messages:
>>> pane.convert('fail', t.Union[int, t.Tuple[int, str], list[int]])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "pane/convert.py", line 489, in convert
return from_data(data, ty)
^^^^^^^^^^^^^^^^^^^
File "pane/convert.py", line 484, in from_data
return converter.convert(val)
^^^^^^^^^^^^^^^^^^^^^^
File "pane/convert.py", line 128, in convert
raise ConvertError(node)
pane.convert.ConvertError: Expected one of:
- an int
- tuple of length 2
- sequence
Instead got `fail` of type `str`
Features
pane is a work in progress. The following is a roadmap of features:
| Feature | State |
|---|---|
| Basic type conversions | Done |
| Numeric array types (numpy) | Done |
| Sum & product type support | Done |
| Tagged unions | Partial |
| 'Flattened' fields | Planned |
| Basic dataclasses | Done |
| Dataclass helpers | Partial |
| Generic & inherited dataclasses | Done |
| Parameter aliases & renaming | Done |
| Arbitrary validation logic | Done |
| Schema import/export | Not planned |
Metadata
Release files for py-pane 0.11.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_pane-0.11.7.tar.gz | 48.9 kB | Without provenance | Details for py_pane-0.11.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_pane-0.11.7-py3-none-any.whl | Python 3 | none | any | Details for py_pane-0.11.7-py3-none-any.whl |
Total release size: 90.7 kB
Release files / py_pane-0.11.7.tar.gz
| Download URL | py_pane-0.11.7.tar.gz |
|---|---|
| Size | 48.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd5f7ab796814860cce53573ffe4da99b8195c6d4120c1ba2bd76b8bed00a75d
|
|
BLAKE2b-256 checksum How to use checksums |
fe210bc98d7a3fa81a3c7b193b3682362299303b49d3af5907db538f2d937ce5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / py_pane-0.11.7-py3-none-any.whl
| Download URL | py_pane-0.11.7-py3-none-any.whl |
|---|---|
| Size | 41.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34f47c73236de601ed11362869d41644332231c31cc6b10cf62fba36a67bb184
|
|
BLAKE2b-256 checksum How to use checksums |
baf99dd1b0158cc17abdb3c363f795ab1cfcde943c155289682a37eaa81b440f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for py-pane 0.11.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.