Skip to main content

Tiffler

A Niffler that only likes shiny variables

Installation

pip install -U tiffler

Usage

import tiffler

template = "One {unit} was equal to {num_sickles:int} Sickles or {num_knuts:int} Knuts."
variables = tiffler.scan(
    template, 
    "one Galleon was equal to 17 Sickles or 493 Knuts.", 
    case_sensitive=False
)

print(variables)

#{'unit': 'Galleon', 'num_sickles': 17, 'num_knuts': 493}
import tiffler

template = "\s+{item}: {price:int} {unit:str:\w+}"
bill = """
    Pewter cauldron: 15 galeons,
    Brass cauldron: 21 galeons,
    Copper cauldron: 25 galeons,
"""
for match in tiffler.search(template, bill, case_sensitive=False):
    print(match)

# {'item': 'Pewter cauldron', 'price': 15, 'unit': 'galeons'}
# {'item': 'Brass cauldron', 'price': 21, 'unit': 'galeons'}
# {'item': 'Copper cauldron', 'price': 25, 'unit': 'galeons'}

Metadata

Release files for tiffler 0.1.11

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tiffler 0.1.11
File Size Uploaded Provenance Actions
tiffler-0.1.11.tar.gz 3.0 kB Without provenance Details for tiffler-0.1.11.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tiffler 0.1.11
File Interpreter ABI Platform Actions
tiffler-0.1.11-py3-none-any.whl Python 3 none any Details for tiffler-0.1.11-py3-none-any.whl

Total release size: 6.0 kB

Release files / tiffler-0.1.11.tar.gz

Download URL tiffler-0.1.11.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c2ebf1ed37e606d952ffb4f4e9ab8593f4d30c9b4777030c576accceb97bb19e
BLAKE2b-256 checksum
How to use checksums
35ea6df82fcf9c9fce9f4437194d70669590022bb5ad7f29178fbac00894f26e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Release files / tiffler-0.1.11-py3-none-any.whl

Download URL tiffler-0.1.11-py3-none-any.whl
Size 3.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
68586d476cea9006d2283a4baeafbaf169326bb1d8feb9891ff93ed32615ebf9
BLAKE2b-256 checksum
How to use checksums
0cfd706f7dbe119b987222a63c6c162ab65b01c2f6ebd95ce88908b791f01be5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.9.7

Security for tiffler 0.1.11

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page