2024-02-02 09:01:31 +00:00
|
|
|
# numpydantic
|
|
|
|
|
|
|
|
Type and shape validation and serialization for numpy arrays in pydantic models
|
|
|
|
|
|
|
|
This package was picked out of [nwb-linkml](https://github.com/p2p-ld/nwb-linkml/), a
|
|
|
|
translation of the [NWB](https://www.nwb.org/) schema language and data format to
|
2024-02-03 06:45:50 +00:00
|
|
|
linkML and pydantic models. It's in a hurried and limited form to make it
|
|
|
|
available for a LinkML hackathon, but will be matured as part of `nwb-linkml` development
|
|
|
|
as the primary place this logic exists.
|
2024-02-02 09:01:31 +00:00
|
|
|
|
|
|
|
It does two primary things:
|
|
|
|
- **Provide types** - Annotations (based on [npytyping](https://github.com/ramonhagenaars/nptyping))
|
|
|
|
for specifying numpy arrays in pydantic models, and
|
|
|
|
- **Generate models from LinkML** - extend the LinkML pydantic generator to create models that
|
|
|
|
that use the [linkml-arrays](https://github.com/linkml/linkml-arrays) syntax
|
|
|
|
|
2024-02-03 06:45:50 +00:00
|
|
|
|
|
|
|
|
2024-02-05 23:39:29 +00:00
|
|
|
|
|
|
|
```{toctree}
|
|
|
|
:maxdepth: 2
|
|
|
|
:caption: Contents
|
|
|
|
:hidden: true
|
2024-02-03 06:45:50 +00:00
|
|
|
|
2024-02-05 23:39:29 +00:00
|
|
|
overview
|
|
|
|
ndarray
|
|
|
|
linkml
|
|
|
|
hooks
|
|
|
|
todo
|
|
|
|
```
|
2024-02-03 06:45:50 +00:00
|
|
|
|
2024-02-02 09:01:31 +00:00
|
|
|
```{toctree}
|
|
|
|
:maxdepth: 2
|
2024-02-05 23:39:29 +00:00
|
|
|
:caption: API
|
|
|
|
:hidden: true
|
|
|
|
|
|
|
|
api/index
|
|
|
|
api/ndarray
|
|
|
|
api/proxy
|
|
|
|
api/linkml/index
|
|
|
|
api/maps
|
|
|
|
api/monkeypatch
|
2024-02-03 06:45:50 +00:00
|
|
|
|
2024-02-02 09:01:31 +00:00
|
|
|
```
|
|
|
|
|