Skip to main content

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

MIT

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

py_type_converter-0.0.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_type_converter-0.0.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file py_type_converter-0.0.1.tar.gz.

File metadata

  • Download URL: py_type_converter-0.0.1.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

Hashes for py_type_converter-0.0.1.tar.gz
Algorithm Hash digest
SHA256 45552149d9272b164f93e2cb7b9375383c31976b18b4ef0865780713b8910bf8
MD5 7da2629fd53026a05138013b42907f09
BLAKE2b-256 bc6188297b319e847300865dc53b766c4df34ecd2496b25a5fd70f34a35122ab

See more details on using hashes here.

File details

Details for the file py_type_converter-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: py_type_converter-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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

Hashes for py_type_converter-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 506ff163bfb7e900406b0d747c291f74a5a40bf36e74466f7e0f81a4a28c6c1c
MD5 b886fae749051c33646d0db4c3f87c5f
BLAKE2b-256 a47c45a691852ef9beedabd8a1489cf2f2478362511b2ef13a9c5aac8a09954a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page