Hide navigation sidebar
Hide table of contents sidebar
Skip to content
Back to top
View this page
Toggle table of contents sidebar

# Welcome to convertertools documentation!

Installation & Usage

- Installation
- Usage

Project Info

- Changelog
  - v0.6.1 (2025-01-17)
  - v0.6.0 (2025-01-17)
  - v0.5.0 (2024-06-27)
  - v0.4.1 (2024-06-27)
  - v0.4.0 (2024-06-27)
  - v0.3.0 (2024-06-27)
  - v0.2.2 (2024-06-27)
  - v0.2.1 (2024-06-27)
  - v0.2.0 (2024-06-27)
  - v0.1.0 (2024-06-27)
  - v0.0.0 (2024-06-27)
- Contributing
  - Types of Contributions
  - Get Started!
  - Pull Request Guidelines
  - Tips
  - Making a new release

# convertertools

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):

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.