# is_empty
[![](https://img.shields.io/badge/Version-1.0.1-green)](https://github.com/wskoly/is_empty) [![](https://img.shields.io/badge/Author-Wahid%20Sadique%20Koly-red)](https://github.com/wskoly/)
### Python package to check whether a variable is empty or not.
- [Description](#Description)
- [Installation](#Installation)
- [Examples](#examples)
- [Author](#author)
- [License](#license)
## Description
- The package has two functions named `empty()` and `not_empty()` which can check if a variable is empty or not.
- The following values evaluate to empty:
- 0
- 0.0
- ""
- None
- False
- []
- ()
- {}
- set()
- b""
## Installation
To install, write the following command in your terminal.
```py
pip install is_empty
```
## Examples
Import the functions to your code.
```py
from is_empty import empty, not_empty
```
- Check whether a list is empty or not using empty().
```py
#The function will return True in this case
items = []
if empty(items):
#Do something
else:
#Do something else
```
- Check whether a tuple is not empty using not_empty.
```py
#The function will return True in this case
items = (1,2,3)
if not_empty(items):
#Do something
```
## Author
**Wahid Sadique Koly**
- [Github](https://github.com/wskoly/)
- [Portfolio](https://wskoly.ml)
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "https://github.com/wskoly/is_empty/",
"name": "is-empty",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,variable,is empty,empty,length",
"author": "Wahid Sadique Koly",
"author_email": "wskoly.bp@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/4b/49/9ad078142caf40d11d357444f2211941cf78dafdfb8015fd1ea0716c8d0a/is_empty-1.0.1.tar.gz",
"platform": null,
"description": "# is_empty\n[![](https://img.shields.io/badge/Version-1.0.1-green)](https://github.com/wskoly/is_empty) [![](https://img.shields.io/badge/Author-Wahid%20Sadique%20Koly-red)](https://github.com/wskoly/)\n### Python package to check whether a variable is empty or not.\n\n- [Description](#Description)\n- [Installation](#Installation)\n- [Examples](#examples)\n- [Author](#author)\n- [License](#license)\n\n## Description\n- The package has two functions named `empty()` and `not_empty()` which can check if a variable is empty or not.\n- The following values evaluate to empty:\n - 0\n - 0.0\n - \"\"\n - None\n - False\n - []\n - ()\n - {}\n - set()\n - b\"\"\n\n## Installation\nTo install, write the following command in your terminal.\n```py\npip install is_empty\n```\n## Examples\nImport the functions to your code.\n```py\nfrom is_empty import empty, not_empty\n```\n- Check whether a list is empty or not using empty().\n```py\n#The function will return True in this case\nitems = []\nif empty(items):\n #Do something\nelse:\n #Do something else\n```\n- Check whether a tuple is not empty using not_empty.\n```py\n#The function will return True in this case\nitems = (1,2,3)\nif not_empty(items):\n #Do something\n```\n\n## Author\n**Wahid Sadique Koly**\n- [Github](https://github.com/wskoly/) \n- [Portfolio](https://wskoly.ml)\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python package to check whether a variable is empty or not.",
"version": "1.0.1",
"project_urls": {
"Homepage": "https://github.com/wskoly/is_empty/"
},
"split_keywords": [
"python",
"variable",
"is empty",
"empty",
"length"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "608228109c4e627adaf92a154b9bab1e4df65638c450311a9574fb96017731d0",
"md5": "a6a7053c512f9082c59fd3de42089d2f",
"sha256": "e2299257acca65ba0b7a7e5958474233d84b2af0655b12b1fd5631a28fb4e150"
},
"downloads": -1,
"filename": "is_empty-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6a7053c512f9082c59fd3de42089d2f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3928,
"upload_time": "2022-09-10T10:07:06",
"upload_time_iso_8601": "2022-09-10T10:07:06.832063Z",
"url": "https://files.pythonhosted.org/packages/60/82/28109c4e627adaf92a154b9bab1e4df65638c450311a9574fb96017731d0/is_empty-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4b499ad078142caf40d11d357444f2211941cf78dafdfb8015fd1ea0716c8d0a",
"md5": "6cff7508dccdb7257a82a4ee490170a5",
"sha256": "f0c11d84e91410021a01f20b1271927d641213fec00ab686d2ffcb9cfb8f55b2"
},
"downloads": -1,
"filename": "is_empty-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "6cff7508dccdb7257a82a4ee490170a5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3536,
"upload_time": "2022-09-10T10:07:08",
"upload_time_iso_8601": "2022-09-10T10:07:08.983081Z",
"url": "https://files.pythonhosted.org/packages/4b/49/9ad078142caf40d11d357444f2211941cf78dafdfb8015fd1ea0716c8d0a/is_empty-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-09-10 10:07:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "wskoly",
"github_project": "is_empty",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "is-empty"
}