Metadata-Version: 2.1
Name: TSclasses
Version: 0.0.2
Summary: Simple Class Attribute Type Validation
Project-URL: Homepage, https://github.com/gon555551/tsclasses
Project-URL: Issues, https://github.com/gon555551/tsclasses/issues
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# Class Attribute Type Validation

Includes the `Validate` superclass, the `validate` decorator, and the `ValidationError` exception.

Inheriting from `Validate` or using the `validate` decorator will result in instantiation type-checking based on annotations, as well as in-method attribute static-typing by raising `ValidationError`.

## Example
```python
from tsclasses import Validate


class Example(Validate):
    number: int
    
    def __init__(self, *args, **kwargs):
        self.string = "five"
    
    def valid_method(self):
        self.number = 5
        
    def invalid_method(self):
        self.string = 5
```
