Skip to main content

Script host utils.

Project description

script_host_utils

Script host utils.

Installation

pip install script_host_utils

Usage

from script_host_utils import filtered_json_dumps, levenshtein_distance
import json

assert(
    json.loads(filtered_json_dumps(
        # obj
        {
            "key_for_extract_1": {
                "subkey_for_extract_11": 1,
                "subkey_for_extract_12": 2,
                "subkey_for_EXCLUDE_13": 3
            },
            "key_for_extract_2": {
                "subkey_for_extract_21": 1,
                "subkey_for_EXCLUDE_22": 2
            },
            "key_as_is_3": 1
        },
        # filter_obj
        {
            "key_for_extract_1": ["subkey_for_extract_11", "subkey_for_extract_12"],
            "key_for_extract_2": ["subkey_for_extract_21"]
        },
        # mapping_obj
        {
            "subkey_for_extract_21": "zzz"
        }
    )) == {
        "key_for_extract_1": {
            "subkey_for_extract_11": 1,
            "subkey_for_extract_12": 2
        },
        "key_for_extract_2": {
            "zzz": 1
        },
        "key_as_is_3": 1
    }
)

assert(levenshtein_distance("q123wer456", "zq823wer456z") == 3)

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

script_host_utils-1.0.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distributions

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

script_host_utils-1.0.0-cp311-abi3-win_amd64.whl (18.9 kB view details)

Uploaded CPython 3.11+Windows x86-64

script_host_utils-1.0.0-cp311-abi3-manylinux_2_34_x86_64.whl (16.9 kB view details)

Uploaded CPython 3.11+manylinux: glibc 2.34+ x86-64

File details

Details for the file script_host_utils-1.0.0.tar.gz.

File metadata

  • Download URL: script_host_utils-1.0.0.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.2

File hashes

Hashes for script_host_utils-1.0.0.tar.gz
Algorithm Hash digest
SHA256 3ea9d1fe9382e680ff6997b78c21c5d74ff6f48a8090e9920e58894ad232ffd8
MD5 84d1218620ff1013474fd74f9391755e
BLAKE2b-256 1c149a648d8d0d0305de4097ea13c693c1a4318a12a1b00b0f61c37c630af3fd

See more details on using hashes here.

File details

Details for the file script_host_utils-1.0.0-cp311-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for script_host_utils-1.0.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6c13bc2820bda575332efade1a4dc08910440bda7509dd063003ea8699325bb0
MD5 81d4db9fa3ea8863c63774252167175d
BLAKE2b-256 8f35764b96511a4eba49185898fd4803e2bd64cbc00651e253fc5c1737d5d7a9

See more details on using hashes here.

File details

Details for the file script_host_utils-1.0.0-cp311-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for script_host_utils-1.0.0-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 126ac2a993e3de1350331b402d3fdfc935d30d2ee61c4cbe50d7f7dfd518ee20
MD5 6d1a41ea8b324ee2e3dd934c33d45da4
BLAKE2b-256 40f8cd8a92e57104c7eb29efee58c1ffada31874882044706f9e67619ddc9672

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