Skip to main content

xy_dict

说明

字典工具。

源码仓库

安装

pip install xy_dict

使用

from xy_dict.utils import is_empty_dict, dict_get

object_map_0 = {}
is_empty_dict(object_map_0)
# True

object_map_1 = {"key_0":"object_0"}
is_empty_dict(object_map_1)
# False

dict_get(object_map_1, "key_0")
# object_0

dict_get(object_map_0, "key_0")
# None

from xy_dict.Dict import Dict

object_map_2 = {"key_0":"object_0", "key_1":{"key_2":"object_2"}, "key_3":["object_3"]}
object_dict = Dict(object_map_2)

object_dict.search_k("key_0")
object_dict.key_map
# {'key_0': 'object_0'}

object_dict.search_k("key_1")
object_dict.key_map
# {'key_1': {'key_2': 'object_2'}}

object_dict.search_v("object_0")
object_dict.key_map
# {'key_0': 'object_0'}

object_dict.search_v({"key_2":"object_2"})
object_dict.key_map
# {'key_1': {'key_2': 'object_2'}}

object_dict.search_kv('key_0', 'object_0')
object_dict.key_map
# {'key_0': 'object_0'}

object_dict.search_kv('key_0', 'object_0')
object_dict.key_map
# {'key_0': 'object_0'}

object_dict.search_kv('key_0', 'object_01')
object_dict.key_map
# {}

许可证

xy_dict 根据 <木兰宽松许可证, 第2版> 获得许可。有关详细信息,请参阅 LICENSE 文件。

捐赠

如果小伙伴们觉得这些工具还不错的话,能否请咱喝一杯咖啡呢?

Pay-Total

联系方式

微信: yuyangiit
邮箱: yuyangit.0515@qq.com

Release files for xy-dict 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xy-dict 1.0.7
File Size Uploaded
xy_dict-1.0.7.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xy-dict 1.0.7
File Interpreter ABI Platform
xy_dict-1.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 18.8 kB

Release files / xy_dict-1.0.7.tar.gz

Download URL xy_dict-1.0.7.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c999d3aac6f4ed54af08ca28e7b5436e1677ed03ef64d816ec5fb659324568c8
BLAKE2b-256 checksum
How to use checksums
c3a3ea9e27580d73c3f11de08cd2bd5d1b8460251bee7d445d733495d4e70b2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release files / xy_dict-1.0.7-py3-none-any.whl

Download URL xy_dict-1.0.7-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bdeb2a22d9809e71ec4e0c2f295a7b672ffc72b8ba5c4a9753acb6221efbcf8d
BLAKE2b-256 checksum
How to use checksums
81d1ac97958ef8d97d686f72fec46f61f1ada009a89670d50cca4cd16270bf86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.0.7 This release

2 release files

1.0.6

2 release files

1.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page