Metadata-Version: 2.1
Name: nested_type_checker
Version: 0.9.5
Summary: A runtime strict type-checking module for Python designed to validate parametrized (nested) types.
Home-page: https://github.com/JokeUrSelf/nested-type-checker
Author: JokeUrSelf
License: MIT
Platform: any
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown

## Nested Type Checker (Beta)

A runtime strict type-checking module for Python designed to validate parametrized (nested) types.
It supports both Python built-in types and custom types.

## Example Usage

To check if an object matches a specified parametrized type, use the function
`is_object_of_type(obj, parametrized_type)`:

```python
from lib.nested_type_checker import is_object_of_type

obj = [123, ({"", True},)]

CorrectType = list[int | tuple[dict[str, bool]]]
WrongType = list[bool | tuple[dict[str, bool]]]

a = is_object_of_type(obj, CorrectType)
b = is_object_of_type(obj, WrongType)

print(a)  # outputs True
print(b)  # outputs False
```

## Support

The module supports can validate mappings, tuples, lists, sets, frozensets, callables, unions, optionals, and any other parametrized or unparametrized types, including custom (unparametrized) types.

## Installation

To install, use Python's `pip` package manager:

```sh
pip install nested_type_checker
```
