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.5.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.5-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: py_type_converter-0.0.5.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.5.tar.gz
Algorithm Hash digest
SHA256 f87542e270db6dff29131f6489664c232debf5ca65f879256e444c56ce05ef79
MD5 87501f3d8214b52f2473226a6d9f718e
BLAKE2b-256 ba70b2ad2321cf336ddcc8c79db5d3bf0555887799ebf0690f2c2a4785231a20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: py_type_converter-0.0.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 e5648a677ee79cebe6ba5c8141c53ef28882bd88103d6a83e1dfeb0e9965949c
MD5 55e29f6d01c87d37a4ef1d7d435f284d
BLAKE2b-256 127eb0a3cd0e0de98d9cc0262b5654b4aa3cf8d589f216278096fd3435f40436

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