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.1.tar.gz (4.4 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.1-cp311-abi3-win_amd64.whl (20.0 kB view details)

Uploaded CPython 3.11+Windows x86-64

script_host_utils-1.0.1-cp311-abi3-manylinux_2_34_x86_64.whl (17.2 kB view details)

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

File details

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

File metadata

  • Download URL: script_host_utils-1.0.1.tar.gz
  • Upload date:
  • Size: 4.4 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.1.tar.gz
Algorithm Hash digest
SHA256 e64a2446af1883dd12560c0034213a311b25a1e6e48604f3423f7617865b109e
MD5 905d02650fe1181702387359ed1dbc8d
BLAKE2b-256 aeea91889eeb0debfee18a14e94871def21f236d23ff0a82b656ef61ae0b8df2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for script_host_utils-1.0.1-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 784238fe7987d95ab2a30f01c01b83be95aca1c188aff040cd49f64fd2341b7b
MD5 5d26928c78c53e17e6294a746aca6fd8
BLAKE2b-256 1ecd14b30bbab65f5a91a44585935d0c01d06087ca20ee004b7319e4bc686be7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for script_host_utils-1.0.1-cp311-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8196f7ed6ef4076233e420cef96bd663bfd8688ac3806a4a5b65badab8d5caa2
MD5 7299b16c3d34583e13134457c33d3f4d
BLAKE2b-256 8dbd8e5215498b6acd9491fc6c4b63f521f3a5c0944b31e0645298a107078bef

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