Skip to main content

Pattern matching utilities.

Project description

Pattern Utils

Pattern matching utilities.

Currently the only implemented matcher is for generators/iterators.

Example:

from patternlib import generator as gen


def example_generator():
    yield "some resource"
    return "done"


match gen.matcher(example_generator()):
    case gen.Node(resource, gen.Empty(end_result)):
        print(resource, end_result)

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

pattern_utils-0.1.0.tar.gz (31.1 kB view details)

Uploaded Source

Built Distribution

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

pattern_utils-0.1.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file pattern_utils-0.1.0.tar.gz.

File metadata

  • Download URL: pattern_utils-0.1.0.tar.gz
  • Upload date:
  • Size: 31.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pattern_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0416b87e4e824c406f52a4ad912156d6fa32f727ae36b3b53c916fc6bd0eea98
MD5 286cfea73e04e3ea0c9a1248dadeeeef
BLAKE2b-256 cf24eace02929e9cb65a5b74b192cf6a68772f7350bf2ecc8cc2ab01cbb067d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pattern_utils-0.1.0.tar.gz:

Publisher: python-publish.yml on Jamie-Chang/pattern-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pattern_utils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pattern_utils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for pattern_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 625c0bba403fb02e18a4a509ffaab16f120831b9e4b5ea6afcd1ac5e65f74750
MD5 4ac58ffb07872a61b543f46d337ed34f
BLAKE2b-256 d41e5df58388c7cdfcb687e15962f58a38550a1799f9e9b305109f24f932a60f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pattern_utils-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on Jamie-Chang/pattern-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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