-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a9a45f8
commit 608b517
Showing
25 changed files
with
844 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
############ | ||
``parasite`` | ||
############ | ||
|
||
Member Reference | ||
================ | ||
|
||
.. automodule:: parasite | ||
:members: | ||
:inherited-members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
#################### | ||
``parasite`` Package | ||
#################### | ||
.. _apidocs: | ||
|
||
Module API | ||
========== | ||
############# | ||
API Reference | ||
############# | ||
|
||
.. automodule:: parasite | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
This section documents the API of the ``parasite`` package. Use the links below to | ||
navigate the code documentation. | ||
|
||
Module Reference | ||
================ | ||
Modules | ||
======= | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
|
||
_root | ||
_const | ||
errors | ||
any | ||
array | ||
boolean | ||
never | ||
object |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
################## | ||
``parasite.never`` | ||
################## | ||
|
||
Brief | ||
===== | ||
|
||
Reference for the ``never`` submodule of the ``parasite`` package. This submodule | ||
contains the :class:`Never` class, which is a simple class that always raises a | ||
:class:`ValidationError` when called. | ||
|
||
Usage | ||
===== | ||
|
||
.. code-block:: python | ||
from parasite import p | ||
schema = p.never() | ||
schema.parse(1) # ValidationError: this type can never be parsed | ||
... | ||
schema = p.obj({ "name": p.never() }) | ||
schema.parse({ "name": "John" }) # ValidationError: key 'name' found, but this type can never be parsed | ||
... | ||
Member Reference | ||
================ | ||
|
||
.. automodule:: parasite.never | ||
:members: | ||
:inherited-members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
################### | ||
``parasite.object`` | ||
################### | ||
|
||
Brief | ||
===== | ||
|
||
Reference for the ``object`` submodule of the ``parasite`` package. This submodule | ||
contains the :class:`Object` class, which is a generic container for a dictionary Python object. | ||
|
||
Usage | ||
===== | ||
|
||
.. code-block:: python | ||
from parasite import p | ||
schema = p.obj({ | ||
"name": p.string(), | ||
"age": p.number().integer().min(0), | ||
}).strict() | ||
schema.parse({ | ||
"name": "John", | ||
"age": 30, | ||
}) # -> {'name': 'John', 'age': 30 } | ||
... | ||
Member Reference | ||
================ | ||
|
||
.. automodule:: parasite.object | ||
:members: | ||
:inherited-members: | ||
:undoc-members: | ||
:show-inheritance: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
project = 'Parasite' | ||
copyright = f'2024-{datetime.date.today().year}, Hendrik Boeck <[email protected]>' | ||
author = 'Hendrik Boeck <[email protected]>' | ||
release = 'v0.1.5' | ||
release = 'v0.1.6' | ||
html_title = f"{project} {release}" | ||
|
||
# -- General configuration --------------------------------------------------- | ||
|
@@ -30,9 +30,13 @@ | |
templates_path = ['_templates'] | ||
exclude_patterns = [] | ||
|
||
pygments_style = "emacs" | ||
pygments_dark_style = "one-dark" | ||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
html_theme = 'qiskit-ecosystem' | ||
# html_theme = 'furo' | ||
html_static_path = ['_static'] | ||
html_logo = "_static/parasite-logo.png" | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "parasite" | ||
version = "0.1.5" | ||
version = "0.1.6" | ||
description = "Data validation for Python 3" | ||
authors = ["Hendrik Boeck <[email protected]>"] | ||
packages = [{ include = "*", from = "src" }] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.