tsafe


Nametsafe JSON
Version 1.3.1 PyPI version JSON
download
home_pageNone
SummaryA module that forces functions to be type safe.
upload_time2024-10-19 14:27:27
maintainerNone
docs_urlNone
authorEthan Illingsworth
requires_python<4.0,>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # TSafe
A module that forces functions to be type safe.

![PyPI - Version](https://img.shields.io/pypi/v/tsafe)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tsafe)
![PyPI - License](https://img.shields.io/pypi/l/tsafe)

## Table of Contents
* [Install](#install)
* [Quick Start](#quick-start)
* [Docs](#docs)
* [Contributing](#contributing)

## Install
To install TSafe use `pip`.
```
pip3 install tsafe
```

## Quick Start
To get started with TSafe first import functions from `tsafe` into your project like this.
```py
from tsafe import FUNCTIONS_HERE
```

To find out what to import, and how to use TSafe check out the [docs](#docs).


## Docs

### type_safe/safe
Wrapper function to force a function to be type safe

Ussage:
```py
from tsafe import type_safe

@type_safe # or @safe
def hello_x(x: str):
    print("Hello " + x)

hello_x("World")
# works normally
# output: "Hello World"

hello_x(12)
# throws error since int is not type str
# output: Exception: argument 12 is not type of <class 'str'>

```

## Contributing
All types of contibutions are welcome for the TSafe project, whether its updating the documentation, reporting issues, or simply mentioning TSafe in your projects.

Remember this before contibuting, you should open an **Issue** if you don't think you can contribute and open a **Pull Request** if you have a patch for an issue.



### Reporting Bugs
Before you submit a bug report make sure you have the following information or are using the following things.

* Make sure you're on the latest version.
* Make sure its not just on your end (if you were possibly using a python version we dont support).
* Check issues to see if it has already been reported.
* Collect the following info about the bug:
    * Stack Trace.
    * OS, Platform and Version (Windows, Linux, macOS, x86, ARM).
    * Possibly your input and the output.
    * Can you reliably reproduce the issue?

If you have all of that prepared you are more than welcome to open an issue for the community to take a look at.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tsafe",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ethan Illingsworth",
    "author_email": "illingsworth.ethan@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/47/91/8d19eb78eb5f57d678614bdaa39c3bcaa2ea3c4c628d39c9cc0b20488880/tsafe-1.3.1.tar.gz",
    "platform": null,
    "description": "# TSafe\nA module that forces functions to be type safe.\n\n![PyPI - Version](https://img.shields.io/pypi/v/tsafe)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/tsafe)\n![PyPI - License](https://img.shields.io/pypi/l/tsafe)\n\n## Table of Contents\n* [Install](#install)\n* [Quick Start](#quick-start)\n* [Docs](#docs)\n* [Contributing](#contributing)\n\n## Install\nTo install TSafe use `pip`.\n```\npip3 install tsafe\n```\n\n## Quick Start\nTo get started with TSafe first import functions from `tsafe` into your project like this.\n```py\nfrom tsafe import FUNCTIONS_HERE\n```\n\nTo find out what to import, and how to use TSafe check out the [docs](#docs).\n\n\n## Docs\n\n### type_safe/safe\nWrapper function to force a function to be type safe\n\nUssage:\n```py\nfrom tsafe import type_safe\n\n@type_safe # or @safe\ndef hello_x(x: str):\n    print(\"Hello \" + x)\n\nhello_x(\"World\")\n# works normally\n# output: \"Hello World\"\n\nhello_x(12)\n# throws error since int is not type str\n# output: Exception: argument 12 is not type of <class 'str'>\n\n```\n\n## Contributing\nAll types of contibutions are welcome for the TSafe project, whether its updating the documentation, reporting issues, or simply mentioning TSafe in your projects.\n\nRemember this before contibuting, you should open an **Issue** if you don't think you can contribute and open a **Pull Request** if you have a patch for an issue.\n\n\n\n### Reporting Bugs\nBefore you submit a bug report make sure you have the following information or are using the following things.\n\n* Make sure you're on the latest version.\n* Make sure its not just on your end (if you were possibly using a python version we dont support).\n* Check issues to see if it has already been reported.\n* Collect the following info about the bug:\n    * Stack Trace.\n    * OS, Platform and Version (Windows, Linux, macOS, x86, ARM).\n    * Possibly your input and the output.\n    * Can you reliably reproduce the issue?\n\nIf you have all of that prepared you are more than welcome to open an issue for the community to take a look at.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A module that forces functions to be type safe.",
    "version": "1.3.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0631f4abc772c25a639e11a2204137a9cd28834b86b8a3842d7bae71a4397908",
                "md5": "5a22fe9b10e411e4ba0ef287cdccf095",
                "sha256": "86d224e4095835a9e6323d3b65f746b1879a45f9e68007374a576ae9d57b9ce7"
            },
            "downloads": -1,
            "filename": "tsafe-1.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5a22fe9b10e411e4ba0ef287cdccf095",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 3430,
            "upload_time": "2024-10-19T14:27:26",
            "upload_time_iso_8601": "2024-10-19T14:27:26.208463Z",
            "url": "https://files.pythonhosted.org/packages/06/31/f4abc772c25a639e11a2204137a9cd28834b86b8a3842d7bae71a4397908/tsafe-1.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "47918d19eb78eb5f57d678614bdaa39c3bcaa2ea3c4c628d39c9cc0b20488880",
                "md5": "b8fe9db8d4a637d5bf771872be136e68",
                "sha256": "47bf544c32e75a6e02ff1cc66e7def595819f75d2dab386506e8e6dd04b6526e"
            },
            "downloads": -1,
            "filename": "tsafe-1.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "b8fe9db8d4a637d5bf771872be136e68",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 2907,
            "upload_time": "2024-10-19T14:27:27",
            "upload_time_iso_8601": "2024-10-19T14:27:27.701175Z",
            "url": "https://files.pythonhosted.org/packages/47/91/8d19eb78eb5f57d678614bdaa39c3bcaa2ea3c4c628d39c9cc0b20488880/tsafe-1.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 14:27:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tsafe"
}
        
Elapsed time: 0.49977s