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.6.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: xy_dict-1.0.6.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.6.tar.gz
Algorithm Hash digest
SHA256 1a270b7a7701eb781a20f136dc8b02065fd69d08aa4310b29356e733f38bba06
MD5 77bc25b8bc8403e8bdc617ebf92860f1
BLAKE2b-256 7193bf9f40ae60bffb1485f333831e255c31365a8e5a018b2088a5fa7fcfb31c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xy_dict-1.0.6-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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 2c23cdb97676811e29e748ebbb96915496920cb81711d6bdffd6f335d35af22f
MD5 e54b6466f9a142248a8655b2b6905a5d
BLAKE2b-256 f5cdcbe473062db2dae8f7339dd40f81e6f19cba0cf0494e94ad9ee28f5a495a

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