# ve-utils
[![CircleCI](https://circleci.com/gh/mano8/ve_utils.svg?style=svg)](https://app.circleci.com/pipelines/github/mano8/ve_utils)
[![PyPI package](https://img.shields.io/pypi/v/ve_utils.svg)](https://pypi.org/project/ve_utils/)
[![codecov](https://codecov.io/gh/mano8/ve_utils/branch/master/graph/badge.svg?token=ADZ070QHDR)](https://codecov.io/gh/mano8/ve_utils)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d5241461e15b492e9008ba87b3d24a3a)](https://www.codacy.com/gh/mano8/ve_utils/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mano8/ve_utils&utm_campaign=Badge_Grade)
This is a Python utilities helper.
## Installation
#### Install from PyPi :
You can install the ve_utils helper from PyPI:
```plaintext
$ pip install ve_utils
```
#### Install from GitHub repository :
To install directly from GitHub:
```plaintext
$ python3 -m pip install "git+https://github.com/mano8/ve_utils"
```
# How to use
### UType :
import package :
```plaintext
from ve_utils.utype import UType as Ut
```
#### Test format :
Example for is_list method:
>>> my_var = [ 0, 1 ,2 ,3 ]
>>> Ut.is_list(my_var, not_null=True)
>>> True
>>> Ut.is_list(my_var, min_items=5)
>>> False
>>> Ut.is_list(my_var, max_items=2)
>>> False
>>> Ut.is_list(my_var, eq=4)
>>> True
>>> Ut.is_list([], not_null=True)
>>> False
>>> Ut.is_list([])
>>> True
>>> Ut.is_list(dict())
>>> False
The methods ```is_list, is_dict and is_tuple ``` takes the sames arguments.
Example for is_int method:
>>> my_var = 10
>>> Ut.is_int(my_var, not_null=True)
>>> True
>>> Ut.is_int(my_var, mini=15)
>>> False
>>> Ut.is_int(my_var, maxi=2)
>>> False
# value is_int an is equal to 2
>>> Ut.is_int(2, eq=2)
>>> True
>>> Ut.is_int(0, not_null=True)
>>> False
>>> Ut.is_int(-10, positive=True)
>>> False
>>> Ut.is_int(-10, negative=True)
>>> True
>>> Ut.is_int("hello")
>>> False
The methods ```is_int, is_float and is_numeric ``` takes the sames arguments.
``is_numeric`` method allow to work with float and int instances.
Raw data
{
"_id": null,
"home_page": "https://github.com/mano8/ve_utils",
"name": "ve-utils",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": "",
"keywords": "",
"author": "Eli Serra",
"author_email": "eli.serra173@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/ee/07/c3249531dc8b74588a52301cd609678f3ae59cda4564fa61f11d660fa6ff/ve_utils-2.5.3.tar.gz",
"platform": null,
"description": "# ve-utils\n\n[![CircleCI](https://circleci.com/gh/mano8/ve_utils.svg?style=svg)](https://app.circleci.com/pipelines/github/mano8/ve_utils)\n[![PyPI package](https://img.shields.io/pypi/v/ve_utils.svg)](https://pypi.org/project/ve_utils/)\n[![codecov](https://codecov.io/gh/mano8/ve_utils/branch/master/graph/badge.svg?token=ADZ070QHDR)](https://codecov.io/gh/mano8/ve_utils)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d5241461e15b492e9008ba87b3d24a3a)](https://www.codacy.com/gh/mano8/ve_utils/dashboard?utm_source=github.com&utm_medium=referral&utm_content=mano8/ve_utils&utm_campaign=Badge_Grade) \n\nThis is a Python utilities helper. \n\n## Installation\n\n#### Install from PyPi :\n\nYou can install the ve_utils helper from PyPI:\n\n```plaintext\n$ pip install ve_utils\n```\n\n#### Install from GitHub repository :\n\nTo install directly from GitHub:\n\n```plaintext\n$ python3 -m pip install \"git+https://github.com/mano8/ve_utils\"\n```\n\n# How to use\n\n### UType :\nimport package :\n\n```plaintext\nfrom ve_utils.utype import UType as Ut\n```\n\n#### Test format :\nExample for is_list method:\n\n >>> my_var = [ 0, 1 ,2 ,3 ]\n >>> Ut.is_list(my_var, not_null=True)\n >>> True\n >>> Ut.is_list(my_var, min_items=5)\n >>> False\n >>> Ut.is_list(my_var, max_items=2)\n >>> False\n >>> Ut.is_list(my_var, eq=4)\n >>> True \n >>> Ut.is_list([], not_null=True)\n >>> False \n >>> Ut.is_list([])\n >>> True \n >>> Ut.is_list(dict())\n >>> False \n\nThe methods ```is_list, is_dict and is_tuple ``` takes the sames arguments.\n\nExample for is_int method:\n\n >>> my_var = 10\n >>> Ut.is_int(my_var, not_null=True)\n >>> True\n >>> Ut.is_int(my_var, mini=15)\n >>> False\n >>> Ut.is_int(my_var, maxi=2)\n >>> False\n # value is_int an is equal to 2\n >>> Ut.is_int(2, eq=2)\n >>> True\n >>> Ut.is_int(0, not_null=True)\n >>> False \n >>> Ut.is_int(-10, positive=True)\n >>> False\n >>> Ut.is_int(-10, negative=True)\n >>> True \n >>> Ut.is_int(\"hello\")\n >>> False \n\nThe methods ```is_int, is_float and is_numeric ``` takes the sames arguments.\n``is_numeric`` method allow to work with float and int instances.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Utilities helper library for Python",
"version": "2.5.3",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d6e386a14355470a4c7b2156f1ed5e96b8ceb12c004903cfa2312b923c7791ff",
"md5": "78ba5262c9241b9f240ab46d41992eaf",
"sha256": "5189a7c80ebc331a40f3ae885411368bc3a0a0473faa58463fbd4b709938d913"
},
"downloads": -1,
"filename": "ve_utils-2.5.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "78ba5262c9241b9f240ab46d41992eaf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.5",
"size": 21520,
"upload_time": "2023-01-03T17:56:02",
"upload_time_iso_8601": "2023-01-03T17:56:02.814766Z",
"url": "https://files.pythonhosted.org/packages/d6/e3/86a14355470a4c7b2156f1ed5e96b8ceb12c004903cfa2312b923c7791ff/ve_utils-2.5.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ee07c3249531dc8b74588a52301cd609678f3ae59cda4564fa61f11d660fa6ff",
"md5": "09d80f2a94f1503c62462f68cc4a1553",
"sha256": "c93c73ba1d6b358a13f7f4c6d8443e4aaa51b81230fcbac30210328e7b4b4909"
},
"downloads": -1,
"filename": "ve_utils-2.5.3.tar.gz",
"has_sig": false,
"md5_digest": "09d80f2a94f1503c62462f68cc4a1553",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.5",
"size": 43795,
"upload_time": "2023-01-03T17:56:16",
"upload_time_iso_8601": "2023-01-03T17:56:16.902004Z",
"url": "https://files.pythonhosted.org/packages/ee/07/c3249531dc8b74588a52301cd609678f3ae59cda4564fa61f11d660fa6ff/ve_utils-2.5.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-03 17:56:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "mano8",
"github_project": "ve_utils",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"circle": true,
"requirements": [],
"lcname": "ve-utils"
}