Python type converter.
Project description
type-converter
type-converter is provides type conversion of lists, dictionaries, sets and tuples. With this function, you can simply convert the type you want 🤟.
Installation
Use the package manager pip to install type-converter.
pip install py-type-converter
Usage
import py_type_converter as converter
# returns 'list'
my_set = {1, 2, "three"}
converter.set_to_list(my_set)
# output: [1, 2, "three"]
# returns 'set'
my_tuple = ("one", "two", "three", "three")
converter.tuple_to_set(my_tuple)
# output: {"one", "two", "three"}
# returns 'list'
my_dict = {"a":1, "b":2, "c":3}
converter.dict_values_to_list(my_dict)
# output: [1, 2, 3]
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_type_converter-0.0.2.tar.gz.
File metadata
- Download URL: py_type_converter-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77d977dcaeb918110e2a48af22efbcc38f064dfc0d5211f7defc1bc11dffced
|
|
| MD5 |
01f32661c79825267a814fdc8957c24c
|
|
| BLAKE2b-256 |
6111862a0b94ad076659168c411b8a97d6f6652a9b90fc89829b3711a5c301b8
|
File details
Details for the file py_type_converter-0.0.2-py3-none-any.whl.
File metadata
- Download URL: py_type_converter-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4364be78d024d07ccee60899afc063502ef2e26858f84cb5f283261e10bd889
|
|
| MD5 |
e6113791708c8c9ed8e11a1a00166408
|
|
| BLAKE2b-256 |
fd962b6a78662534b65f695e5c7deb49726ba3056fbde8cfe9c783add30cf5c6
|