# funx
[](https://badge.fury.io/py/funx)
[](https://opensource.org/licenses/MIT)
The main reason why this library was created is to :
### use
```python
from funx import isinstances
def add(num1: int, num2: int) -> int:
if isinstances(num1, num2, datatype=int): # 41 char
return num1 + num2
raise TypeError("invalid arguments types")
print(add(3, 7))
```
### in place of
```python
def add(num1: int, num2: int) -> int:
if isinstance(num1, int) and isinstance(num2, int): # 51 char
return num1 + num2
raise TypeError("invalid arguments types")
print(add(3, 7))
```
### and
```python
from funx import isinstances
def fun(name: str, age: int) -> None:
if isinstances(name, age, datatype=(str, int)): # 47 char
print(f"your name is {name} and your age is {age}")
return
raise TypeError("invalid arguments types")
fun("mohamed", 23)
```
### in place of
```python
def fun(name: str, age: int) -> None:
if isinstance(name, str) and isinstance(age, int): # 50 char
print(f"your name is {name} and your age is {age}")
return
raise TypeError("invalid arguments types")
fun("mohamed", 23)
```
but not just this there is other funcs and with a very advanced usage you can see the source code and check all the tests in the main fun
## Installation
You can install `funx` via pip:
```bash
pip install funx
```
## License
This project is licensed under the MIT LICENSE - see the [LICENSE](https://opensource.org/licenses/MIT) for more details.
Raw data
{
"_id": null,
"home_page": "https://pypi.org/project/funx/",
"name": "funx",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": "python, utilities, helpers, functions, clean code, readable code, maintainable code, utility library, code quality, developer tools, productivity",
"author": "khiat Mohammed Abderrezzak",
"author_email": "khiat.dev@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/26/36/0877ecd4c03b536c03fa2d608a9c8ed8e863c5e8219eafed443eb5640411/funx-1.0.0.tar.gz",
"platform": null,
"description": "# funx\n\n[](https://badge.fury.io/py/funx)\n[](https://opensource.org/licenses/MIT)\n\nThe main reason why this library was created is to :\n\n### use\n\n```python\nfrom funx import isinstances\n\n\ndef add(num1: int, num2: int) -> int:\n if isinstances(num1, num2, datatype=int): # 41 char\n return num1 + num2\n raise TypeError(\"invalid arguments types\")\n\n\nprint(add(3, 7))\n```\n\n### in place of\n\n```python\ndef add(num1: int, num2: int) -> int:\n if isinstance(num1, int) and isinstance(num2, int): # 51 char\n return num1 + num2\n raise TypeError(\"invalid arguments types\")\n\n\nprint(add(3, 7))\n```\n\n### and\n\n```python\nfrom funx import isinstances\n\n\ndef fun(name: str, age: int) -> None:\n if isinstances(name, age, datatype=(str, int)): # 47 char\n print(f\"your name is {name} and your age is {age}\")\n return\n raise TypeError(\"invalid arguments types\")\n\n\nfun(\"mohamed\", 23)\n```\n\n### in place of\n\n```python\ndef fun(name: str, age: int) -> None:\n if isinstance(name, str) and isinstance(age, int): # 50 char\n print(f\"your name is {name} and your age is {age}\")\n return\n raise TypeError(\"invalid arguments types\")\n\n\nfun(\"mohamed\", 23)\n```\n\nbut not just this there is other funcs and with a very advanced usage you can see the source code and check all the tests in the main fun\n\n## Installation\n\nYou can install `funx` via pip:\n\n```bash\npip install funx\n```\n\n## License\n\nThis project is licensed under the MIT LICENSE - see the [LICENSE](https://opensource.org/licenses/MIT) for more details.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python utility functions for cleaner, more readable code",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://pypi.org/project/funx/"
},
"split_keywords": [
"python",
" utilities",
" helpers",
" functions",
" clean code",
" readable code",
" maintainable code",
" utility library",
" code quality",
" developer tools",
" productivity"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0b7bb5e3530474038287088e2ce4c5b8f0b0d8e4f4d5db09fb834a33d0e020c8",
"md5": "aaed6d15602cd25375dbdee2e2fe07e0",
"sha256": "424686ba8127ba587b14e0edf2b195c518f5e6b91541574e0b9e534cf0ef6a90"
},
"downloads": -1,
"filename": "funx-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "aaed6d15602cd25375dbdee2e2fe07e0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 10223,
"upload_time": "2025-10-22T13:26:06",
"upload_time_iso_8601": "2025-10-22T13:26:06.452031Z",
"url": "https://files.pythonhosted.org/packages/0b/7b/b5e3530474038287088e2ce4c5b8f0b0d8e4f4d5db09fb834a33d0e020c8/funx-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "26360877ecd4c03b536c03fa2d608a9c8ed8e863c5e8219eafed443eb5640411",
"md5": "48225d83146fcd5e9d0127a0f3864e98",
"sha256": "709297e5869dd0da2f3ab9e487caadcd99f67c3e6b05de251d2a0ac7014da6b4"
},
"downloads": -1,
"filename": "funx-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "48225d83146fcd5e9d0127a0f3864e98",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 10421,
"upload_time": "2025-10-22T13:26:07",
"upload_time_iso_8601": "2025-10-22T13:26:07.987852Z",
"url": "https://files.pythonhosted.org/packages/26/36/0877ecd4c03b536c03fa2d608a9c8ed8e863c5e8219eafed443eb5640411/funx-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-22 13:26:07",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "funx"
}