Skip to main content

An Pythonic Dictionary path generator

Project description

Pyhtonic Dictionary Path Generator

A package used to the get the Full Pythonic Dictionary Path of the Search key .

How to use

To install the package

pip install find-dict-path

After installing the package use following import:

from find_dict_path import Find_Dict_Path

search_key_from_dict = {"full name":"Brendan Stiedemann","address":{"street":{"colony":"Reinger Inc","extra_info":[{"date":"2023-05-06"},{"uuid":"6eca8033-ba89-4db2-bdb1-c2e0a4f6e0e6"},{"phone":"615-335-1131"}]}}} 

search_key = 'phone'

search_path_finder_from_dict = Find_Dict_Path()

full_path = search_path_finder_from_dict.get_full_path(search_key_from_dict,search_key)

print(full_path)

#['address']['street']['extra_info'][2]['phone']
 

If you wants to get path in every occurrence of the list within dictionary then we can use find_first_occurance=False by default it is set as True

full_path = search_path_finder_from_dict.get_full_path(search_key_from_dict,search_key,find_first_occurance=False)

print(full_path)

#['address']['street']['extra_info'][*]['phone'] 

NOTE: In output path [*] represent the List is present.

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

find_dict_path-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

find_dict_path-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file find_dict_path-0.0.1.tar.gz.

File metadata

  • Download URL: find_dict_path-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for find_dict_path-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e53aff4784aa858b54671d4502be813cea615eb6394982dd6fed8efb1f2782a8
MD5 155ddf93c5e33bd20f70b8d2c20d3d71
BLAKE2b-256 b4fd000a684cf1f40b6a81ef41f90da6ff33adfefad342ed01627e6d27621fdc

See more details on using hashes here.

File details

Details for the file find_dict_path-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: find_dict_path-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for find_dict_path-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6a984ed7f7aede792b8b9eaad7a480730090ecee4ca7a71f7d6e53d437089f40
MD5 20869f7438953d5fd454b38f9dc8763b
BLAKE2b-256 a19245daafd519d89bf3017fc111177b356c129c262105fa97129afdfe53bf1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page