Skip to main content

SearchEngineForJSON

Project description

SearchEngine for JSON (自作パッケージ公開練習)

  • json形式のデータから指定の型を持つkeyとvalueを再起的に取得します

install

pip install SearchEngineForJSON

ディレクトリ構造

|--packagingTutorial
|  |--SearchEngineForJSON
|  |  |--__init__.py
|  |  |--searchMain.py
|  |--setup.py

Usage

from SearchEngineForJSON.searchMain import Search

Search.moldSearch(探索したいデータ, 探索したい型) -> [[key, value], []]

Example

from SearchEngineForJSON.searchMain import Search

data = {
  "name1": "hello",
  "name2": {
    "name2-1": 2,
    "name2-2": "world"
  }
}

items = Search.moldSearch(data, str)

for item in items:
  print(item)
["name1", "hello"]
["name2.name2-2", "world"]


data = {
    "name1": "Nakamura",
    "name2": {
        "name2-1": "Aoi",
        "name2-2": [
            "listA",
            "listB",
            {
                "listC-1": "listInDict1",
                "listC-2": "listInDict2",
                "listC-3": {
                    "listC-3-1": "hello",
                    "listC-3-2": "world"
                }
            }
        ]
    }
}

items = Search.moldSearch(data, str)

for item in items:
    print(item)

['name1', 'Nakamura']
['name2.name2-1', 'Aoi']
['name2.name2-2.0', 'listA']
['name2.name2-2.1', 'listB']
['name2.name2-2.2.listC-1', 'listInDict1']
['name2.name2-2.2.listC-2', 'listInDict2']
['name2.name2-2.2.listC-3.listC-3-1', 'hello']
['name2.name2-2.2.listC-3.listC-3-2', 'world']


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

SearchEngineForJSON-0.1.2-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

SearchEngineForJSON-0.1.2-py2-none-any.whl (3.3 kB view details)

Uploaded Python 2

File details

Details for the file SearchEngineForJSON-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: SearchEngineForJSON-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0

File hashes

Hashes for SearchEngineForJSON-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fcf6fedc77008e5641312964198b59aa97b8afbfc983a33cf8be94d5b424228b
MD5 99c1b41a5f0d3a622c8330c405d4f1b3
BLAKE2b-256 0331c980d6ecbd9b180e92e494354dcc426eda5d3e144f198a365384f7a85894

See more details on using hashes here.

File details

Details for the file SearchEngineForJSON-0.1.2-py2-none-any.whl.

File metadata

  • Download URL: SearchEngineForJSON-0.1.2-py2-none-any.whl
  • Upload date:
  • Size: 3.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.0

File hashes

Hashes for SearchEngineForJSON-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 58b70ebf59cdd8f18305a8591bcd6713ddcde4d1c72eac3da9f116608552f908
MD5 04d58fa2578fd34d2696710783baee94
BLAKE2b-256 de23f970ce5e057e8e0cf5ff3fff885dd5e118e6b560b986b58cd69a0ed448e5

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