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.4.tar.gz (2.9 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.4-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_type_converter-0.0.4.tar.gz
  • Upload date:
  • Size: 2.9 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.4.tar.gz
Algorithm Hash digest
SHA256 504d0ab744529b9fe6beeaa236b8b64157a86b10272e023d151394a0ad7694bb
MD5 488a467a32201fde24ba53e76968fa1f
BLAKE2b-256 baa2b0af8171c73e28d068a7a459d88d90b16c5d20827ea5279c198c1da708db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_type_converter-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8f9415275f6da0f74368ed302c2339800c3761b1ccc68c328237691e8619adc3
MD5 ba1014e9cff17d5a2cdf2d85c577f4f6
BLAKE2b-256 db9c14d3914d7b9476ab83ff44b5a0c513d294aa17425a870cec4b1774c539bb

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