From 94d3e24e92ab96828468f76e49ec8511eeafc2db Mon Sep 17 00:00:00 2001 From: norpadon Date: Wed, 26 Jun 2024 23:08:04 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20norpadon?= =?UTF-8?q?/wanga@14b0eca9db81343469cf32254764d68155bc2722=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _modules/index.html | 107 ++++++++ _modules/wanga/schema/extract.html | 256 +++++++++++++++++++ _modules/wanga/schema/schema.html | 288 +++++++++++++++++++++ _sources/api.rst.txt | 22 ++ _sources/index.rst.txt | 3 +- api.html | 394 +++++++++++++++++++++++++++++ genindex.html | 226 ++++++++++++++++- index.html | 20 +- objects.inv | Bin 257 -> 535 bytes py-modindex.html | 135 ++++++++++ search.html | 7 +- searchindex.js | 2 +- 12 files changed, 1447 insertions(+), 13 deletions(-) create mode 100644 _modules/index.html create mode 100644 _modules/wanga/schema/extract.html create mode 100644 _modules/wanga/schema/schema.html create mode 100644 _sources/api.rst.txt create mode 100644 api.html create mode 100644 py-modindex.html diff --git a/_modules/index.html b/_modules/index.html new file mode 100644 index 0000000..9eedfb8 --- /dev/null +++ b/_modules/index.html @@ -0,0 +1,107 @@ + + + + + + Overview: module code — wanga documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ +

All modules for which code is available

+ + +
+
+
+ +
+ +
+

© Copyright 2024, Artur Chakhvadze <norpadon@gmail.com>.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/wanga/schema/extract.html b/_modules/wanga/schema/extract.html new file mode 100644 index 0000000..0eb8005 --- /dev/null +++ b/_modules/wanga/schema/extract.html @@ -0,0 +1,256 @@ + + + + + + wanga.schema.extract — wanga documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for wanga.schema.extract

+import inspect
+from collections.abc import Callable
+from types import NoneType, UnionType
+from typing import Any, get_args, get_origin
+
+from attrs import frozen
+from docstring_parser import parse as parse_docstring
+
+from .normalize import normalize_annotation
+from .schema import (
+    CallableSchema,
+    MappingNode,
+    ObjectField,
+    ObjectNode,
+    PrimitiveNode,
+    SchemaNode,
+    SequenceNode,
+    TupleNode,
+    UndefinedNode,
+    UnionNode,
+)
+
+__all__ = [
+    "annotation_to_schema",
+    "extract_schema",
+]
+
+
+@frozen
+class DocstringHints:
+    object_hint: str | None
+    param_to_hint: dict[str, str]
+
+
+def extract_hints(callable: Callable) -> DocstringHints:
+    docstring = inspect.getdoc(callable)
+    if docstring is not None:
+        docstring = parse_docstring(docstring)
+        object_hint = docstring.short_description
+        param_to_hint = {
+            param.arg_name: param.description
+            for param in docstring.params
+            if param.description
+        }
+    else:
+        object_hint = None
+        param_to_hint = {}
+
+    if isinstance(callable, type) and hasattr(callable, "__init__"):
+        init_hints = extract_hints(callable.__init__)
+        object_hint = object_hint or init_hints.object_hint
+        param_to_hint.update(init_hints.param_to_hint)
+
+    return DocstringHints(object_hint, param_to_hint)
+
+
+
+[docs] +def annotation_to_schema(annotation) -> SchemaNode: + r"""Extract schema from the type annotation.""" + if annotation in [Any, None]: + return UndefinedNode(original_annotation=annotation) + + annotation = normalize_annotation(annotation, concretize=True) + + if annotation in [int, float, str, bool]: + return PrimitiveNode(primitive_type=annotation) # type: ignore + + origin = get_origin(annotation) + args = get_args(annotation) + + if origin is None: + # Object node, so we need to extract fields from the constructor signature. + init_schema = extract_schema(annotation) + return init_schema.call_schema + + # Normalization step has already converted all abstract classes to the corresponding concrete types. + # So we can safely check against list and dict. + if issubclass(origin, list): + assert ( + len(args) == 1 + ), "Sequence type annotation should have exactly one argument." + return SequenceNode( + sequence_type=origin, + item_schema=annotation_to_schema(args[0]), + ) + if issubclass(origin, tuple): + return TupleNode( + tuple_type=origin, + item_schemas=[annotation_to_schema(arg) for arg in args], + ) + if issubclass(origin, dict): + assert ( + len(args) == 2 + ), "Mapping type annotation should have exactly two arguments." + return MappingNode( + mapping_type=origin, + key_schema=annotation_to_schema(args[0]), + value_schema=annotation_to_schema(args[1]), + ) + if issubclass(origin, UnionType): + arg_schemas = [] + for arg in args: + if arg is NoneType: + arg_schemas.append(None) + else: + arg_schemas.append(annotation_to_schema(arg)) + return UnionNode(options=arg_schemas) + + raise ValueError(f"Unsupported type annotation: {annotation}")
+ + + +
+[docs] +def extract_schema(callable: Callable) -> CallableSchema: + r"""Extract schema from a callable.""" + signature = inspect.signature(callable, eval_str=True) + return_type = signature.return_annotation + + hints = extract_hints(callable) + + if return_type is inspect.Signature.empty: + return_schema = UndefinedNode(original_annotation=Any) + else: + return_schema = annotation_to_schema(return_type) + + object_fields = [] + for param in signature.parameters.values(): + if param.annotation is inspect.Signature.empty: + arg_schema = UndefinedNode(original_annotation=Any) + else: + arg_schema = annotation_to_schema(param.annotation) + field = ObjectField( + param.name, + arg_schema, + hints.param_to_hint.get(param.name), + param.default is param.empty, + ) + object_fields.append(field) + + return CallableSchema( + call_schema=ObjectNode( + name=callable.__name__, + fields=object_fields, + hint=hints.object_hint, + ), + return_schema=return_schema, + )
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2024, Artur Chakhvadze <norpadon@gmail.com>.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_modules/wanga/schema/schema.html b/_modules/wanga/schema/schema.html new file mode 100644 index 0000000..e6e3de8 --- /dev/null +++ b/_modules/wanga/schema/schema.html @@ -0,0 +1,288 @@ + + + + + + wanga.schema.schema — wanga documentation + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +

Source code for wanga.schema.schema

+from collections.abc import Mapping, Sequence
+from types import NoneType
+from typing import Any
+
+from attrs import frozen
+
+__all__ = [
+    "CallableSchema",
+    "MappingNode",
+    "ObjectField",
+    "ObjectNode",
+    "PrimitiveNode",
+    "SchemaNode",
+    "SequenceNode",
+    "TupleNode",
+    "UndefinedNode",
+    "UnionNode",
+]
+
+
+
+[docs] +@frozen +class SchemaNode: + r"""Base class for schema nodes.""" + + pass
+ + + +
+[docs] +@frozen +class UndefinedNode(SchemaNode): + r"""Node corresponding to missing, `Any`, or `None` annotations. + + Atributes + original_annotation: `Any` if the annotation is missing or `Any`, + `None` if the annotation is `None`. + """ + + original_annotation: NoneType | Any
+ + + +
+[docs] +@frozen +class PrimitiveNode(SchemaNode): + r"""Node corresponding to primitive types. + + Primitime types are `int`, `float`, `str`, and `bool`. + + Attributes: + primitive_type: The primitive type. + """ + + primitive_type: type[int] | type[float] | type[str] | type[bool]
+ + + +
+[docs] +@frozen +class SequenceNode(SchemaNode): + r"""Node corresponding to generic homogeneous sequence types. + (Does not include tuples and strings) + + Attributes: + sequence_type: The sequence type. + item_schema: The schema of the items in the sequence. + """ + + sequence_type: type[Sequence] + item_schema: SchemaNode
+ + + +
+[docs] +@frozen +class TupleNode(SchemaNode): + r"""Node corresponding to tuples and named tuples. + + Attributes: + tuple_type: The tuple type (`tuple`, or a subclass of `typing.NamedTuple`). + item_schemas: The schemas of the items in the tuple. + """ + + tuple_type: type[tuple] + item_schemas: list[SchemaNode]
+ + + +
+[docs] +@frozen +class MappingNode(SchemaNode): + r"""Node corresponding to generic mapping types. + + Attributes: + mapping_type: The mapping type (e.g. `dict` or `collections.defaultdict`). + key_schema: The schema of the keys in the mapping. + value_schema: The schema of the values in the mapping. + """ + + mapping_type: type[Mapping] + key_schema: SchemaNode + value_schema: SchemaNode
+ + + +
+[docs] +@frozen +class UnionNode(SchemaNode): + r"""Node corresponding to `Union` and `Optional` types. + + Attributes: + options: The schemas of the options in the union. + May be None in case of optional types. + """ + + options: list[SchemaNode | None]
+ + + +
+[docs] +@frozen +class ObjectField: + r"""Field in an object schema. + + Arguments: + name: Name of the field. + schema: Schema of the field. + hint: Hint extracted from the docstring. + required: Whether the field is optional or required. + """ + + name: str + schema: SchemaNode + hint: str | None + required: bool
+ + + +
+[docs] +@frozen +class ObjectNode(SchemaNode): + r"""Node corresponding to composite types. + + Represents the signature of the constructor. + + Attributes: + name: Name of the object. + fields: The fields of the object. + hint: Hint extracted from the docstring. + """ + + name: str + fields: list[ObjectField] + hint: str | None
+ + + +
+[docs] +@frozen +class CallableSchema: + r"""Complete schema of a function of a class. + + Attributes: + call_schema: Schema of the function call. + return_schema: Schema of the return value. + None if the function returns None. + """ + + call_schema: ObjectNode + return_schema: SchemaNode
+ +
+ +
+
+
+ +
+ +
+

© Copyright 2024, Artur Chakhvadze <norpadon@gmail.com>.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/_sources/api.rst.txt b/_sources/api.rst.txt new file mode 100644 index 0000000..cc4986a --- /dev/null +++ b/_sources/api.rst.txt @@ -0,0 +1,22 @@ +API Reference +============= + +.. module:: wanga + + +Schema extraction and manipulation +---------------------------------- + +.. currentmodule:: wanga + +Schema Definition +^^^^^^^^^^^^^^^^^ + +.. automodule:: wanga.schema.schema + :members: + +Schema Extraction +^^^^^^^^^^^^^^^^^ + +.. automodule:: wanga.schema.extract + :members: diff --git a/_sources/index.rst.txt b/_sources/index.rst.txt index 82bce6d..cb5ae7b 100644 --- a/_sources/index.rst.txt +++ b/_sources/index.rst.txt @@ -7,9 +7,10 @@ Welcome to wanga's documentation! ================================= .. toctree:: - :maxdepth: 2 + :maxdepth: 1 :caption: Contents: + api Indices and tables diff --git a/api.html b/api.html new file mode 100644 index 0000000..6dd14af --- /dev/null +++ b/api.html @@ -0,0 +1,394 @@ + + + + + + + API Reference — wanga documentation + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+ +
+
+
+
+ +
+

API Reference

+
+

Schema extraction and manipulation

+
+

Schema Definition

+
+
+class wanga.schema.schema.CallableSchema(call_schema: ObjectNode, return_schema: SchemaNode)[source]
+

Complete schema of a function of a class.

+
+
+call_schema
+

Schema of the function call.

+
+
Type:
+

wanga.schema.schema.ObjectNode

+
+
+
+ +
+
+return_schema
+

Schema of the return value. +None if the function returns None.

+
+
Type:
+

wanga.schema.schema.SchemaNode

+
+
+
+ +
+ +
+
+class wanga.schema.schema.MappingNode(mapping_type: type[Mapping], key_schema: SchemaNode, value_schema: SchemaNode)[source]
+

Node corresponding to generic mapping types.

+
+
+mapping_type
+

The mapping type (e.g. dict or collections.defaultdict).

+
+
Type:
+

type[collections.abc.Mapping]

+
+
+
+ +
+
+key_schema
+

The schema of the keys in the mapping.

+
+
Type:
+

wanga.schema.schema.SchemaNode

+
+
+
+ +
+
+value_schema
+

The schema of the values in the mapping.

+
+
Type:
+

wanga.schema.schema.SchemaNode

+
+
+
+ +
+ +
+
+class wanga.schema.schema.ObjectField(name: str, schema: SchemaNode, hint: str | None, required: bool)[source]
+

Field in an object schema.

+
+
Parameters:
+
    +
  • name – Name of the field.

  • +
  • schema – Schema of the field.

  • +
  • hint – Hint extracted from the docstring.

  • +
  • required – Whether the field is optional or required.

  • +
+
+
+
+ +
+
+class wanga.schema.schema.ObjectNode(name: str, fields: list[ObjectField], hint: str | None)[source]
+

Node corresponding to composite types.

+

Represents the signature of the constructor.

+
+
+name
+

Name of the object.

+
+
Type:
+

str

+
+
+
+ +
+
+fields
+

The fields of the object.

+
+
Type:
+

list[wanga.schema.schema.ObjectField]

+
+
+
+ +
+
+hint
+

Hint extracted from the docstring.

+
+
Type:
+

str | None

+
+
+
+ +
+ +
+
+class wanga.schema.schema.PrimitiveNode(primitive_type: type[int] | type[float] | type[str] | type[bool])[source]
+

Node corresponding to primitive types.

+

Primitime types are int, float, str, and bool.

+
+
+primitive_type
+

The primitive type.

+
+
Type:
+

type[int] | type[float] | type[str] | type[bool]

+
+
+
+ +
+ +
+
+class wanga.schema.schema.SchemaNode[source]
+

Base class for schema nodes.

+
+ +
+
+class wanga.schema.schema.SequenceNode(sequence_type: type[Sequence], item_schema: SchemaNode)[source]
+
+
Node corresponding to generic homogeneous sequence types.

(Does not include tuples and strings)

+
+
+
+
+sequence_type
+

The sequence type.

+
+
Type:
+

type[collections.abc.Sequence]

+
+
+
+ +
+
+item_schema
+

The schema of the items in the sequence.

+
+
Type:
+

wanga.schema.schema.SchemaNode

+
+
+
+ +
+ +
+
+class wanga.schema.schema.TupleNode(tuple_type: type[tuple], item_schemas: list[SchemaNode])[source]
+

Node corresponding to tuples and named tuples.

+
+
+tuple_type
+

The tuple type (tuple, or a subclass of typing.NamedTuple).

+
+
Type:
+

type[tuple]

+
+
+
+ +
+
+item_schemas
+

The schemas of the items in the tuple.

+
+
Type:
+

list[wanga.schema.schema.SchemaNode]

+
+
+
+ +
+ +
+
+class wanga.schema.schema.UndefinedNode(original_annotation: None | Any)[source]
+

Node corresponding to missing, Any, or None annotations.

+
+
Atributes
+
original_annotation: Any if the annotation is missing or Any,

None if the annotation is None.

+
+
+
+
+
+ +
+
+class wanga.schema.schema.UnionNode(options: list[SchemaNode | None])[source]
+

Node corresponding to Union and Optional types.

+
+
+options
+

The schemas of the options in the union. +May be None in case of optional types.

+
+
Type:
+

list[wanga.schema.schema.SchemaNode | None]

+
+
+
+ +
+ +
+
+

Schema Extraction

+
+
+wanga.schema.extract.annotation_to_schema(annotation) SchemaNode[source]
+

Extract schema from the type annotation.

+
+ +
+
+wanga.schema.extract.extract_schema(callable: Callable) CallableSchema[source]
+

Extract schema from a callable.

+
+ +
+
+
+ + +
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git a/genindex.html b/genindex.html index a64948e..2a5365b 100644 --- a/genindex.html +++ b/genindex.html @@ -44,8 +44,11 @@ @@ -73,8 +76,227 @@

Index

+ A + | C + | E + | F + | H + | I + | K + | M + | N + | O + | P + | R + | S + | T + | U + | V + | W
+

A

+ + +
+ +

C

+ + + +
+ +

E

+ + +
+ +

F

+ + +
+ +

H

+ + +
+ +

I

+ + + +
+ +

K

+ + +
+ +

M

+ + +
+ +

N

+ + +
+ +

O

+ + + +
+ +

P

+ + + +
+ +

R

+ + +
+ +

S

+ + + +
+ +

T

+ + + +
+ +

U

+ + + +
+ +

V

+ + +
+ +

W

+ + + +
    +
  • + wanga + +
  • +
  • + wanga.schema.extract + +
  • +
    +
  • + wanga.schema.schema + +
  • +
+ diff --git a/index.html b/index.html index 579a9cb..315546d 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,8 @@ - + + @@ -45,12 +46,11 @@ @@ -78,6 +78,10 @@

Welcome to wanga’s documentation!

+

Contents:

+
@@ -92,7 +96,9 @@

Indices and tables + +
diff --git a/objects.inv b/objects.inv index 03d790cf45ba9c0b494602de058f3777ef60fb6d..e98707bb89af78173f3d29eba88febcfe75ef070 100644 GIT binary patch delta 425 zcmV;a0apHj0+$4kcz>-`%}xR_5WeqI)aaE)uiT7@2?vyj#3L!)fvtAix}62~=4<$R zK8Y;_b}|0Y;%VEN`M#NNw(YE#S}ez{ zR*Yj3h%%)#G89@(QBQ-@GtFzoy_H17P5~wP`x>BiRLuQOni#we|l%5WbzCiO2>1i3(Q)~>JM6_hGhSZAg zXV1X#R)EZ-8WM2PeQaTL?sMA2f;S9>PVZ2TvfE8s4<2hHt6&C&z31y=Fm T5EyI$GY+mWc7d_gc%s delta 145 zcmV;C0B--61c3sOcz;Vz&CAS7Nv%*QE=jS0@?y9OEU8FP<0olCKe@UplXDOLG%Pe + + + + + Python Module Index — wanga documentation + + + + + + + + + + + + + + + + + + + + +
+ + +
+ +
+
+
+
    +
  • + +
  • +
  • +
+
+
+
+
+ + +

Python Module Index

+ +
+ w +
+ + + + + + + + + + + + + +
 
+ w
+ wanga +
    + wanga.schema.extract +
    + wanga.schema.schema +
+ + +
+
+
+ +
+ +
+

© Copyright 2024, Artur Chakhvadze <norpadon@gmail.com>.

+
+ + Built with Sphinx using a + theme + provided by Read the Docs. + + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/search.html b/search.html index c6809d5..2546700 100644 --- a/search.html +++ b/search.html @@ -47,8 +47,11 @@ diff --git a/searchindex.js b/searchindex.js index 6a849e5..cf0ed15 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles": {"Indices and tables": [[0, "indices-and-tables"]], "Welcome to wanga\u2019s documentation!": [[0, "welcome-to-wanga-s-documentation"]]}, "docnames": ["index"], "envversion": {"sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1}, "filenames": ["index.rst"], "indexentries": {}, "objects": {}, "objnames": {}, "objtypes": {}, "terms": {"index": 0, "modul": 0, "page": 0, "search": 0}, "titles": ["Welcome to wanga\u2019s documentation!"], "titleterms": {"": 0, "document": 0, "indic": 0, "tabl": 0, "wanga": 0, "welcom": 0}}) \ No newline at end of file +Search.setIndex({"alltitles": {"API Reference": [[0, "module-wanga"]], "Contents:": [[1, null]], "Indices and tables": [[1, "indices-and-tables"]], "Schema Definition": [[0, "module-wanga.schema.schema"]], "Schema Extraction": [[0, "module-wanga.schema.extract"]], "Schema extraction and manipulation": [[0, "schema-extraction-and-manipulation"]], "Welcome to wanga\u2019s documentation!": [[1, "welcome-to-wanga-s-documentation"]]}, "docnames": ["api", "index"], "envversion": {"sphinx": 61, "sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1}, "filenames": ["api.rst", "index.rst"], "indexentries": {"annotation_to_schema() (in module wanga.schema.extract)": [[0, "wanga.schema.extract.annotation_to_schema", false]], "call_schema (wanga.schema.schema.callableschema attribute)": [[0, "wanga.schema.schema.CallableSchema.call_schema", false]], "callableschema (class in wanga.schema.schema)": [[0, "wanga.schema.schema.CallableSchema", false]], "extract_schema() (in module wanga.schema.extract)": [[0, "wanga.schema.extract.extract_schema", false]], "fields (wanga.schema.schema.objectnode attribute)": [[0, "wanga.schema.schema.ObjectNode.fields", false]], "hint (wanga.schema.schema.objectnode attribute)": [[0, "wanga.schema.schema.ObjectNode.hint", false]], "item_schema (wanga.schema.schema.sequencenode attribute)": [[0, "wanga.schema.schema.SequenceNode.item_schema", false]], "item_schemas (wanga.schema.schema.tuplenode attribute)": [[0, "wanga.schema.schema.TupleNode.item_schemas", false]], "key_schema (wanga.schema.schema.mappingnode attribute)": [[0, "wanga.schema.schema.MappingNode.key_schema", false]], "mapping_type (wanga.schema.schema.mappingnode attribute)": [[0, "wanga.schema.schema.MappingNode.mapping_type", false]], "mappingnode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.MappingNode", false]], "module": [[0, "module-wanga", false], [0, "module-wanga.schema.extract", false], [0, "module-wanga.schema.schema", false]], "name (wanga.schema.schema.objectnode attribute)": [[0, "wanga.schema.schema.ObjectNode.name", false]], "objectfield (class in wanga.schema.schema)": [[0, "wanga.schema.schema.ObjectField", false]], "objectnode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.ObjectNode", false]], "options (wanga.schema.schema.unionnode attribute)": [[0, "wanga.schema.schema.UnionNode.options", false]], "primitive_type (wanga.schema.schema.primitivenode attribute)": [[0, "wanga.schema.schema.PrimitiveNode.primitive_type", false]], "primitivenode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.PrimitiveNode", false]], "return_schema (wanga.schema.schema.callableschema attribute)": [[0, "wanga.schema.schema.CallableSchema.return_schema", false]], "schemanode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.SchemaNode", false]], "sequence_type (wanga.schema.schema.sequencenode attribute)": [[0, "wanga.schema.schema.SequenceNode.sequence_type", false]], "sequencenode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.SequenceNode", false]], "tuple_type (wanga.schema.schema.tuplenode attribute)": [[0, "wanga.schema.schema.TupleNode.tuple_type", false]], "tuplenode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.TupleNode", false]], "undefinednode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.UndefinedNode", false]], "unionnode (class in wanga.schema.schema)": [[0, "wanga.schema.schema.UnionNode", false]], "value_schema (wanga.schema.schema.mappingnode attribute)": [[0, "wanga.schema.schema.MappingNode.value_schema", false]], "wanga": [[0, "module-wanga", false]], "wanga.schema.extract": [[0, "module-wanga.schema.extract", false]], "wanga.schema.schema": [[0, "module-wanga.schema.schema", false]]}, "objects": {"": [[0, 0, 0, "-", "wanga"]], "wanga.schema": [[0, 0, 0, "-", "extract"], [0, 0, 0, "-", "schema"]], "wanga.schema.extract": [[0, 1, 1, "", "annotation_to_schema"], [0, 1, 1, "", "extract_schema"]], "wanga.schema.schema": [[0, 2, 1, "", "CallableSchema"], [0, 2, 1, "", "MappingNode"], [0, 2, 1, "", "ObjectField"], [0, 2, 1, "", "ObjectNode"], [0, 2, 1, "", "PrimitiveNode"], [0, 2, 1, "", "SchemaNode"], [0, 2, 1, "", "SequenceNode"], [0, 2, 1, "", "TupleNode"], [0, 2, 1, "", "UndefinedNode"], [0, 2, 1, "", "UnionNode"]], "wanga.schema.schema.CallableSchema": [[0, 3, 1, "", "call_schema"], [0, 3, 1, "", "return_schema"]], "wanga.schema.schema.MappingNode": [[0, 3, 1, "", "key_schema"], [0, 3, 1, "", "mapping_type"], [0, 3, 1, "", "value_schema"]], "wanga.schema.schema.ObjectNode": [[0, 3, 1, "", "fields"], [0, 3, 1, "", "hint"], [0, 3, 1, "", "name"]], "wanga.schema.schema.PrimitiveNode": [[0, 3, 1, "", "primitive_type"]], "wanga.schema.schema.SequenceNode": [[0, 3, 1, "", "item_schema"], [0, 3, 1, "", "sequence_type"]], "wanga.schema.schema.TupleNode": [[0, 3, 1, "", "item_schemas"], [0, 3, 1, "", "tuple_type"]], "wanga.schema.schema.UnionNode": [[0, 3, 1, "", "options"]]}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"], "2": ["py", "class", "Python class"], "3": ["py", "attribute", "Python attribute"]}, "objtypes": {"0": "py:module", "1": "py:function", "2": "py:class", "3": "py:attribute"}, "terms": {"The": 0, "abc": 0, "an": 0, "ani": 0, "annot": 0, "annotation_to_schema": 0, "api": 1, "ar": 0, "atribut": 0, "base": 0, "bool": 0, "call": 0, "call_schema": 0, "callabl": 0, "callableschema": 0, "case": 0, "class": 0, "collect": 0, "complet": 0, "composit": 0, "constructor": 0, "correspond": 0, "defaultdict": 0, "dict": 0, "docstr": 0, "doe": 0, "e": 0, "extract_schema": 0, "field": 0, "float": 0, "from": 0, "function": 0, "g": 0, "gener": 0, "hint": 0, "homogen": 0, "i": 0, "includ": 0, "index": 1, "int": 0, "item": 0, "item_schema": 0, "kei": 0, "key_schema": 0, "list": 0, "mai": 0, "map": 0, "mapping_typ": 0, "mappingnod": 0, "miss": 0, "modul": 1, "name": 0, "namedtupl": 0, "node": 0, "none": 0, "object": 0, "objectfield": 0, "objectnod": 0, "option": 0, "original_annot": 0, "page": 1, "paramet": 0, "primit": 0, "primitim": 0, "primitive_typ": 0, "primitivenod": 0, "refer": 1, "repres": 0, "requir": 0, "return": 0, "return_schema": 0, "schemanod": 0, "search": 1, "sequenc": 0, "sequence_typ": 0, "sequencenod": 0, "signatur": 0, "sourc": 0, "str": 0, "string": 0, "subclass": 0, "tupl": 0, "tuple_typ": 0, "tuplenod": 0, "type": 0, "undefinednod": 0, "union": 0, "unionnod": 0, "valu": 0, "value_schema": 0, "wanga": 0, "whether": 0}, "titles": ["API Reference", "Welcome to wanga\u2019s documentation!"], "titleterms": {"": 1, "api": 0, "content": 1, "definit": 0, "document": 1, "extract": 0, "indic": 1, "manipul": 0, "refer": 0, "schema": 0, "tabl": 1, "wanga": 1, "welcom": 1}}) \ No newline at end of file