跳转到主要内容

Python数据类型转换工具

项目描述

convertertools

CI Status Documentation Status Test coverage percentage

Poetry Ruff pre-commit

PyPI Version Supported Python versions License


文档: https://convertertools.readthedocs.io

源代码: https://github.com/bluetooth-devices/convertertools


Python数据类型转换工具

这些是用于操作Python数据结构的非常简单的工具,以避免在库中多次编写相同的代码。

安装

通过pip(或您喜欢的包管理器)安装此软件包

pip install convertertools

用法

请注意,需要特定类型以获得最佳性能。

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"})

贡献者 ✨

感谢这些优秀的人(emoji key

Bluetooth Devices
蓝牙设备

💻 🤔 📖

本项目遵循all-contributors规范。欢迎任何形式的贡献!

致谢

此软件包是用Copierbrowniebroke/pypackage-template项目模板创建的。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪个,请了解有关 安装包 的更多信息。

源代码分布

convertertools-0.5.0.tar.gz (5.6 kB 查看哈希值)

上传时间 源代码

构建分布

convertertools-0.5.0-cp312-cp312-win_amd64.whl (70.0 kB 查看哈希值)

上传时间 CPython 3.12 Windows x86-64

convertertools-0.5.0-cp312-cp312-win32.whl (67.5 kB 查看哈希值)

上传时间 CPython 3.12 Windows x86

convertertools-0.5.0-cp312-cp312-musllinux_1_2_x86_64.whl (164.9 kB 查看哈希值)

上传时间 CPython 3.12 musllinux: musl 1.2+ x86-64

convertertools-0.5.0-cp312-cp312-musllinux_1_2_i686.whl (162.9 kB 查看哈希值)

上传时间 CPython 3.12 musllinux: musl 1.2+ i686

convertertools-0.5.0-cp312-cp312-manylinux_2_36_x86_64.whl (120.6 kB 查看哈希值)

上传时间 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 查看哈希值)

上传时间 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 查看哈希值)

上传时间 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 查看哈希值)

上传时间 CPython 3.12 macOS 14.0+ ARM64

convertertools-0.5.0-cp311-cp311-win_amd64.whl (69.9 kB 查看哈希值)

上传时间 CPython 3.11 Windows x86-64

convertertools-0.5.0-cp311-cp311-win32.whl (21.3 kB 查看哈希值)

上传时间 CPython 3.11 Windows x86

convertertools-0.5.0-cp311-cp311-musllinux_1_2_x86_64.whl (115.4 kB 查看哈希值)

上传时间 CPython 3.11 musllinux: musl 1.2+ x86-64

convertertools-0.5.0-cp311-cp311-musllinux_1_2_i686.whl (112.2 kB 查看哈希值)

上传时间 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 查看哈希值)

上传时间 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 查看哈希值)

上传时间 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 查看哈希值)

上传时间 CPython 3.11 macOS 14.0+ ARM64

支持者