Metadata-Version: 2.1
Name: type-changer
Version: 0.0.2
Summary: Changes the data-type in a json or dictionary using Pydantic Basemodel.
License: AGPL-3.0-or-later
Author: Code63Reaper
Author-email: akilangms542@gmail.com
Maintainer: Code63Reaper
Maintainer-email: akilangms542@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Utilities
Requires-Dist: pydantic (>=2.8.2,<3.0.0)
Description-Content-Type: text/markdown

# Data-Type Caster

This project aim is to convert the given json or dictionary format structure to same structure with values of desired data-type, Which is achived using Pydantic Basemodel.

## Installation
### PIP
```
pip install type-changer
```

## Usage
```
from pydantic import BaseModel
from type_changer import Caster

class model(BaseModel):
    a:str
    b:int
    c:list[str]

input = {"a":"hello", "b":"45327", "c":[34,45,56]}

ct = Caster(model, input)
out = ct.cast()
print(out)
```

### Note:
 - This project consider your input is a valid json or dictionary.
 - Create a Basemodel class for every dict in the json or dictionary.
 - This project supports only the following data-types which are 'str', 'int', 'float', 'list', 'tuple' and 'bool'.

## License
This project is licensed under AGPL-3 license and 'All rights Reserved'. For more details see the LICENSE file.

