Skip to main content

Tools for converting python data types

Project description

convertertools

CI Status Documentation Status Test coverage percentage

Poetry Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://convertertools.readthedocs.io

Source Code: https://github.com/bluetooth-devices/convertertools


Tools for converting python data types

These are very simple tools for manipulating python data structures to avoid writing out the same code many times in libraries.

Installation

Install this via pip (or your favourite package manager):

pip install convertertools

Usage

Note that specific types are required for maximum performance.

from convertertools import del_dict_tuple, del_dict_set, pop_dict_tuple, pop_dict_set

# del_dict* raise KeyError on missing keys
del_dict_tuple(d, ("a", "b"))
del_dict_set(d, {"a", "b"})

# pop_dict* ignores missing keys
pop_dict_tuple(d, ("a", "b"))
pop_dict_set(d, {"a", "b"})

# pop_dict_set_if_none ignores missing keys and only
# removes them if their value is None
pop_dict_set_if_none(d, {"a", "b"})

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Bluetooth Devices
Bluetooth Devices

💻 🤔 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Copier and the browniebroke/pypackage-template project template.

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

convertertools-0.5.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distributions

convertertools-0.5.0-cp312-cp312-win_amd64.whl (70.0 kB view details)

Uploaded CPython 3.12 Windows x86-64

convertertools-0.5.0-cp312-cp312-win32.whl (67.5 kB view details)

Uploaded CPython 3.12 Windows x86

convertertools-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl (164.9 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ x86-64

convertertools-0.5.0-cp312-cp312-musllinux_1_2_i686.whl (162.9 kB view details)

Uploaded CPython 3.12 musllinux: musl 1.2+ i686

convertertools-0.5.0-cp312-cp312-manylinux_2_36_x86_64.whl (120.6 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.36+ x86-64

convertertools-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (168.8 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

convertertools-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl (161.7 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

convertertools-0.5.0-cp312-cp312-macosx_14_0_arm64.whl (68.7 kB view details)

Uploaded CPython 3.12 macOS 14.0+ ARM64

convertertools-0.5.0-cp311-cp311-win_amd64.whl (69.9 kB view details)

Uploaded CPython 3.11 Windows x86-64

convertertools-0.5.0-cp311-cp311-win32.whl (21.3 kB view details)

Uploaded CPython 3.11 Windows x86

convertertools-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl (115.4 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ x86-64

convertertools-0.5.0-cp311-cp311-musllinux_1_2_i686.whl (112.2 kB view details)

Uploaded CPython 3.11 musllinux: musl 1.2+ i686

convertertools-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl (117.1 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

convertertools-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl (111.4 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ i686 manylinux: glibc 2.5+ i686

convertertools-0.5.0-cp311-cp311-macosx_14_0_arm64.whl (22.7 kB view details)

Uploaded CPython 3.11 macOS 14.0+ ARM64

File details

Details for the file convertertools-0.5.0.tar.gz.

File metadata

  • Download URL: convertertools-0.5.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for convertertools-0.5.0.tar.gz
Algorithm Hash digest
SHA256 477812a307adf368805da5ee2cbc2fe984ed305d76164fe3fbc2a9f9baf4c3f0
MD5 c5520e90722d0e0febb817a1df7b086f
BLAKE2b-256 2e343f3fd57d0d3753fb2f69d09164e53a2766618fe3581525cdd23e3f6af1e3

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 4ac2ae852cc6c3e0e3d75fe80276fdecd1889155141364a5c75128c9ff249c29
MD5 ce9e22d33d5f5fde0a35d520ae19952f
BLAKE2b-256 7220df7ffbc14d735a5bceedcde95866cbc90891dde874aee9f986369844cfc0

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-win32.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 cefe9f4be7c600f1e27c1354e8dfd192bcd59f058f99ab93ca1c49abffbae687
MD5 aa72ec132327b5bc32f26cb6b6eb2229
BLAKE2b-256 a331252e999f6e529d0e5a911312af61edee35c6917085bdab6e3b0560a70bb0

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 714dd41ef8bdcba5a9a20c3dc55d604b83b80b603da9ed9ca379893634792eca
MD5 d76634a07d5f3b81ac3103c570a7ffbc
BLAKE2b-256 bab8332f2cd0184e47ab78b2589d15f2c66cdc850120d9b7dcafd4967e6c9e8a

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 723e34b5859c2f7bb1892fe6be71e4d98a89cedd3f9e219b4cb70eb0d94a869a
MD5 58d5e9e7ec7c921447c3a5b8e50c1836
BLAKE2b-256 390dcb85974314cda5211ada4407ab487c057bd455033f2eda5194bcf998d63d

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-manylinux_2_36_x86_64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-manylinux_2_36_x86_64.whl
Algorithm Hash digest
SHA256 021ff984d888b110040ea86a12ff8d02aa29a6f1b603bf88cd42b990f16e5f4e
MD5 7c977fa945f58d3f96e785e69f88b364
BLAKE2b-256 94b488488966fe8217135232cd7a7d2ec6affd3519720a4dd22d78ff78da7b5e

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 24fd3d2c71beb77502ceaab9bb99c3d28b18f071e3856e7c39a62c631173fc7e
MD5 f8ace4cb3772e27eb150342dde414c50
BLAKE2b-256 2e9b24d5adc43a7703c267d325dd68a80e9926b4eff53c87123985f4f6fac7b4

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 e259aca6b4b9b7a30df25be2d2dafd7985c98fd6ce5f8eb5a43874e5ee1b6016
MD5 4eaa97baab1decadca0db4ea0279b152
BLAKE2b-256 0b61560a8510be9d14c91c61da01cb56915a218511ce595cc538d6584657488a

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp312-cp312-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp312-cp312-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 4a8630056eb0d1250177fec1176b1bf9cf6e92eec7973cb78f238b802cc2003c
MD5 90e5fd11659540dbca27d8c2134c13a7
BLAKE2b-256 9f055c4510ed93d107524061fe4eb46231beb97453dde8733d76fe0c84cf8f3e

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 1b7e7dfd3daae6c44e9376297adc9920bd75791ad8de32ebb2f70dcee263e460
MD5 081759d874623fa64b11cebfe280dc22
BLAKE2b-256 856cdca8ad22f0b20f204b027b7a19b5c29ddaaeea8b19a765092b98ac481cf5

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-win32.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 03e2816ea8bd481e0816d27b55a37ba90c01ae9df105d654a1a0e213c6fe425a
MD5 b4968ff84d54262adb3eff4307226184
BLAKE2b-256 8f5ddf3dc11cd2371794dcb0e91e0c1c6e6f50c9121986844850e6dc37920bc5

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e89fbb97f5f2945e11da457c5888f50ca006f9930a3d8d3a932091403cbea36b
MD5 f1e9ed5b7d51f061921e810fab63b3bf
BLAKE2b-256 8c0707e869f51f5d7b16752ccd5e5b419e91f9bbbddfaaf37b598d493c28bb0e

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 cfea4d24a8e988db79b2213124dafdd3d12dc3209c7d1d4d7205a21631bb8888
MD5 871151a2f19808e0632e3f16643f5058
BLAKE2b-256 01b1cee68615a31e298d0a4f4535a37a34927af5b311398b17db9d637a3b1875

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux_2_5_x86_64.manylinux1_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8069e4c6bc908b370bfdb9129af5011d40c0704bda265a8f56345001d0478e6b
MD5 abc9cf66d0373ebd972600f98987465f
BLAKE2b-256 cc3adb9d9abc5aaa6931be4980c3408aa1a1d1bd1f78edddcb88a70682c86f46

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-manylinux_2_17_i686.manylinux_2_5_i686.manylinux1_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 fbf4a533608c525dfbbd9b931e290dd679a74a2d6630f0f2e04d1fa44b33f3b0
MD5 d49f6568352a97b604f527534c1b8321
BLAKE2b-256 d1157e029b8fa22febd76e84d0358b43c7d00407941ac024311b6b9cd122246b

See more details on using hashes here.

File details

Details for the file convertertools-0.5.0-cp311-cp311-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for convertertools-0.5.0-cp311-cp311-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 b723a3486f6250d5d738a31591776cbb20378177030a29f0e4fda56d7b99e795
MD5 e4b6ccdd6695fb732dfe18fbadc83a26
BLAKE2b-256 04da6e302adb7c00b39f5a334157411d543a269eefee0406df79c7e975b374d7

See more details on using hashes here.

Supported by

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