Skip to main content

Exacto

Exacto is a collection of Python tools that simplify splitting strings according to non-trivial business rules. You may find this package useful if:

  • A regular expression is not enough for your use case.
  • You want to avoid writing and maintaining manual parsing code.
  • You don't want to mess around with LLVM or FSMs.

However, if performance is your primary goal, these tools may not be for you.

Usage

from exacto import split, lift, quote, nest

# Simple example with default rules: split on whitespace
result = split("Hello   World")  
assert list(result) == ["Hello", "World"]

# Complicated example with custom separator and quotes
result = split("ENV='Prod-172.0.10.10'.VER='2.1'", quote("'"), ".")
assert list(result) == ["ENV='Prod Env'", "VER='2.1'"]

# Extract embedded tokens
result = lift("Hello [FOO] is [BAR]", nest("[", "]"))
assert list(result) == ["FOO", "BAR"]

Release files for exacto 0.2.2

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

Source distribution (sdist)

Source distribution for exacto 0.2.2
File Size Uploaded
exacto-0.2.2.tar.gz 4.1 kB Details

Release files / exacto-0.2.2.tar.gz

Download URL exacto-0.2.2.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
db74f2ec6f8af4d6b62ddd3cd910bb6b42ddede76af7744fb9f881356b60e75f
BLAKE2b-256 checksum
How to use checksums
ae7ce4184199497cca448e8ce4d32aef8b3634922f66520f148f478c1993ed10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.7.3

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file

0.2.1

1 release file

0.1.4

1 release file

0.1.3

1 release file

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