Skip to main content

Python string unformatter.

Project description

unformat

Python string unformatter.

Simple string pattern matching using f-string-like syntax. This module cannot do anything more than re but is much easier to use.

Usage

from unformat import unformat

unformat("{name}_{idx}.csv", "data_001.csv")  # Values(name='data', idx='001')
unformat("{name}_{idx:int}.csv", "data_001.csv")  # Values(name='data', idx=1)
unformat("{name}_{idx}.csv", "data001.csv")  # Error!

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

unformat-0.1.0.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

unformat-0.1.0-cp311-none-win_amd64.whl (150.8 kB view details)

Uploaded CPython 3.11 Windows x86-64

File details

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

File metadata

  • Download URL: unformat-0.1.0.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.14.16

File hashes

Hashes for unformat-0.1.0.tar.gz
Algorithm Hash digest
SHA256 261991ded54a0a0cbca1f98937e875e99a37a1cbe58f08fcea160ebcad4e8db8
MD5 dcf4c1853beafd7a334f1f044503566e
BLAKE2b-256 28ceba82f3c80d863bfaed42096217ac2983887cb9ec4e82851b4ea3c5f176ee

See more details on using hashes here.

File details

Details for the file unformat-0.1.0-cp311-none-win_amd64.whl.

File metadata

File hashes

Hashes for unformat-0.1.0-cp311-none-win_amd64.whl
Algorithm Hash digest
SHA256 ddef130f0006ba85c795fb1120ece87fa57bee0deb2769e8df81b629c1b81b0c
MD5 d086cdd4ee0671d3b14ac5e91a31c70d
BLAKE2b-256 6f780789c10c0655e52e88d5b298ae85a58ad75660cb4850fb42cb1fc0dcbd2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page