Skip to main content

xy_dict 模块

Project description

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

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

xy_dict-1.0.7.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

xy_dict-1.0.7-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

Details for the file xy_dict-1.0.7.tar.gz.

File metadata

  • Download URL: xy_dict-1.0.7.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for xy_dict-1.0.7.tar.gz
Algorithm Hash digest
SHA256 c999d3aac6f4ed54af08ca28e7b5436e1677ed03ef64d816ec5fb659324568c8
MD5 45692e0c483f24fcd86552b977931741
BLAKE2b-256 c3a3ea9e27580d73c3f11de08cd2bd5d1b8460251bee7d445d733495d4e70b2c

See more details on using hashes here.

File details

Details for the file xy_dict-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: xy_dict-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 9.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.3

File hashes

Hashes for xy_dict-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 bdeb2a22d9809e71ec4e0c2f295a7b672ffc72b8ba5c4a9753acb6221efbcf8d
MD5 af321acccab266285b38b62017fd0887
BLAKE2b-256 81d1ac97958ef8d97d686f72fec46f61f1ada009a89670d50cca4cd16270bf86

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