is_empty
Python package to check whether a variable is empty or not.
Description
- The package has two functions named
empty()andnot_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.
pip install is_empty
Examples
Import the functions to your code.
from is_empty import empty, not_empty
- Check whether a list is empty or not using empty().
#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.
#The function will return True in this case
items = (1,2,3)
if not_empty(items):
#Do something
Author
Wahid Sadique Koly
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for is-empty 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| is_empty-1.0.1.tar.gz | 3.5 kB | Without provenance | Details for is_empty-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| is_empty-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for is_empty-1.0.1-py3-none-any.whl |
Total release size: 7.5 kB
Release files / is_empty-1.0.1.tar.gz
| Download URL | is_empty-1.0.1.tar.gz |
|---|---|
| Size | 3.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f0c11d84e91410021a01f20b1271927d641213fec00ab686d2ffcb9cfb8f55b2
|
|
BLAKE2b-256 checksum How to use checksums |
4b499ad078142caf40d11d357444f2211941cf78dafdfb8015fd1ea0716c8d0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Release files / is_empty-1.0.1-py3-none-any.whl
| Download URL | is_empty-1.0.1-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e2299257acca65ba0b7a7e5958474233d84b2af0655b12b1fd5631a28fb4e150
|
|
BLAKE2b-256 checksum How to use checksums |
608228109c4e627adaf92a154b9bab1e4df65638c450311a9574fb96017731d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.5
|
Security for is-empty 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.