# -*- coding: utf-8 -*-
from setuptools import setup

packages = \
['shapeless']

package_data = \
{'': ['*']}

install_requires = \
['pickle']

setup_kwargs = {
    'name': 'shapeless',
    'version': '0.0.3',
    'description': 'Poly - Pytorch',
    'long_description': '[![Multi-Modality](agorabanner.png)](https://discord.gg/qUtxnK2NMf)\n\n# Poly\nA simple Fluid, PolyMorphic,and shapeless package that activates radically flexiblity and simplicity in your programs\n\n-----\n\n## Installation\n\nYou can install the package using pip\n\n```bash\npip install shapeless\n```\n----\n\n# Usage\n\nHere\'s a simple example of how to use the\xa0`Poly`\xa0class:\n\n```python\nfrom shapeless import Poly\n\n# Create a Poly object with an integer\np = Poly(10)\n\n# Determine the type of the data\nprint(p.determine())  # <class \'int\'>\n\n# Shift the data to a string\nprint(p.shift(str))  # \'10\'\n\n# Validate that the data is a string\nprint(p.validate(str))  # True\n```\n\nYou can also use\xa0`Poly`\xa0as a type hint in your functions:\n\n```python\nfrom shapeless import Poly\n\ndef my_func(a: Poly):\n    print(type(a))\n\n# Create a Poly object with a string\np = Poly(\'10\')\n\n# Pass the Poly object to my_func\nmy_func(p)  # <class \'__main__.Poly\'>\n```\n------\n\n# Documentation\n\nThe `Poly` class is a utility class tailored towards dynamic type handling in Python. It provides functionalities that allow developers to determine, select, shift, validate, alias, annotate, extend, serialize, and deserialize types, making it a versatile tool in many programming scenarios. The class also focuses on thread safety and comes with an optional logging mechanism.\n\n## Class Definition:\n\n```python\nclass Poly(Generic[T]):\n    """\n    The Poly class is a utility class that provides dynamic type handling.\n    It allows users to determine, select, shift, validate, alias, annotate, extend, serialize, and deserialize types.\n    It also provides thread safety and optional logging.\n\n    Parameters:\n    - data (Any): The data whose type is to be managed.\n    - verbose (bool, optional): If True, operations will be logged. Default is False.\n    """\n```\n\n### Initialization:\n\n```python\ndef __init__(self, data: Any, verbose: bool = False):\n    """\n    Initialize a new Poly object.\n\n    Parameters:\n    - data (Any): The data whose type is to be handled.\n    - verbose (bool, optional): If True, log all operations. Default is False.\n    """\n```\n\n### Methods:\n\n#### determine:\n\n```python\ndef determine(self):\n    """\n    Determine the type of the data.\n\n    Returns:\n    - Type of the data.\n    """\n```\n\n#### select:\n\n```python\ndef select(self, target):\n    """\n    Select the type of the data.\n\n    Parameters:\n    - target: The target type to select.\n\n    Returns:\n    - The selected type.\n    """\n```\n\n#### shift:\n\n```python\ndef shift(self, target):\n    """\n    Attempt to shift the data to the target type.\n\n    Parameters:\n    - target: The target type to shift to.\n\n    Returns:\n    - The data shifted to the target type.\n\n    Raises:\n    - TypeError: If the data cannot be shifted to the target type.\n    """\n```\n\n#### validate:\n\n```python\ndef validate(self, target):\n    """\n    Validate that the data is of the target type.\n\n    Parameters:\n    - target: The target type to validate against.\n\n    Returns:\n    - True if data is of target type, otherwise False.\n\n    Raises:\n    - TypeError: If the data is not of the target type.\n    """\n```\n\n#### add_alias:\n\n```python\ndef add_alias(self, alias, target):\n    """\n    Add an alias for a type.\n\n    Parameters:\n    - alias: The alias name.\n    - target: The target type.\n    """\n```\n\n#### annotate:\n\n```python\ndef annotate(self, annotation):\n    """\n    Annotate the data with a type.\n\n    Parameters:\n    - annotation: The type annotation.\n    """\n```\n\n#### extend:\n\n```python\ndef extend(self, extension):\n    """\n    Extend the type of the data with a new type.\n\n    Parameters:\n    - extension: The new type to extend with.\n    """\n```\n\n#### serialize:\n\n```python\ndef serialize(self):\n    """\n    Serialize the data.\n\n    Returns:\n    - The serialized data in byte format.\n    """\n```\n\n#### deserialize:\n\n```python\ndef deserialize(self, serialized_data):\n    """\n    Deserialize the data.\n\n    Parameters:\n    - serialized_data: The data in serialized format.\n\n    Returns:\n    - The deserialized data.\n    """\n```\n\n#### __instancecheck__:\n\n```python\ndef __instancecheck__(self, instance):\n    """\n    Check if an instance is of the selected type.\n\n    Parameters:\n    - instance: The instance to check.\n\n    Returns:\n    - True if the instance is of the selected type, False otherwise.\n    """\n```\n\n## Usage Examples:\n\n### Example 1: Basic Type Handling\n```python\nfrom shapeless import Poly\n\np = Poly(42)\nprint(p.determine())  # <class \'int\'>\n```\n\n### Example 2: Shifting and Validation\n```python\nfrom shapeless import Poly\n\np = Poly("123")\np.shift(int)         # Transforms "123" to 123\np.validate(int)      # Validates data is of type \'int\'\n```\n\n### Example 3: Aliasing and Serialization\n```python\nfrom shapeless import Poly\n\np = Poly(42)\np.add_alias("Integer", int)\nserialized_data = p.serialize()\nprint(serialized_data)  # b\'\\x80\\x04\\x95\\x11\\x00\\x00\\x00\\x00\\x00\\x00\\x00K*.\'\n\ndeserialized_data = p.deserialize(serialized_data)\nprint(deserialized_data)  # 42\n```\n\n## Mathematical Formula:\n\nThe `Poly` class does not have an inherent mathematical formula as its operations are based on dynamic type handling in a programming context. Instead, it can be thought of as a utility that operates on the set of Python types, with various operations (determination, selection, shifting, etc.) acting as transformations within this set.\n\n## Additional Information:\n\n- **Thread Safety**: All operations on the `Poly` class are thread-safe, ensuring data consistency and integrity in multi-threaded environments.\n  \n- **Logging**: The `Poly` class has a verbose mode that can be activated upon initialization. This mode logs all operations, which can be helpful for debugging or understanding the sequence of operations applied to the data.\n\n## References:\n\nFor more information on Python\'s dynamic type system, you can refer to the official Python documentation: [Python Types](https://docs.python.org/3/library/types.html)\n\nFor a deeper understanding of generics in Python, consider reading PEP 484: [Type Hints](https://www.python.org/dev/peps/pep-0484/).\n\n-----\n\n# Vision\nIn today\'s world, programming languages are often divided into statically-typed and dynamically-typed. While statically-typed languages provide type safety and performance benefits, they often lack the flexibility and simplicity that dynamically-typed languages offer. This has led to a growing demand for tools that can bring the benefits of both worlds together.\n\nWe believe the future of programming lies in the ability to handle types in a fluid and flexible manner, without sacrificing the benefits of static typing. However, achieving this is not easy. It requires a deep understanding of both static and dynamic typing, as well as the ability to create a tool that is easy to use, performant, and thread-safe.\n\nMany have tried to solve this problem, but none have succeeded. The challenge lies in creating a tool that is both powerful and simple to use. It requires a radical new approach, one that is not constrained by the traditional boundaries of static and dynamic typing.\n\nThat\'s where Poly comes in. Our secret is our deep understanding of the problems with static types. As creators of multi-modality and fluid intelligences with no defined shape, we have the unique insight and expertise needed to solve this problem. We have created a tool that allows you to handle dynamic types in a flexible and thread-safe manner, without sacrificing the benefits of static typing.\n\nWe are confident that Poly is the best solution to this problem. With our unique approach and deep expertise, we are perfectly positioned to bring this vision to life. Join us on this journey and experience the future of programming today.\n\nContribute Now\n\n\n-----\n\n\n# License\nMIT\n\n',
    'author': 'Kye Gomez',
    'author_email': 'kye@apac.ai',
    'maintainer': 'None',
    'maintainer_email': 'None',
    'url': 'https://github.com/kyegomez/Poly',
    'packages': packages,
    'package_data': package_data,
    'install_requires': install_requires,
    'python_requires': '>=3.6,<4.0',
}


setup(**setup_kwargs)
