Skip to main content

stringle

String wrangling for bulk find-and-replace operations. Example:

from stringle import Directory, Replacer

replacements = [
    ('old_text', 'new_text'),
    ('another_old', 'another_new'),
]
directory = Directory(path='/path/to/directory')
replacer = Replacer(files=directory.selected_files)
replacer(replacements)

Features

  • Recursive directory traversal - Process entire directory trees with the Directory class
  • Multiple replacements - Apply many find-and-replace operations in one pass
  • Case sensitivity control - Case-sensitive or case-insensitive matching
  • Regex support - Use regular expressions for complex patterns
  • Flexible filtering:
    • Ignore specific directories (e.g., .git, .venv, node_modules)
    • Ignore specific files
    • Filter by file extension (ignore or include specific extensions)

Installation

We're on pypi, so uv add stringle.

If working directly on this repo, consider using the simplest-possible virtual environment.

Metadata

Release files for stringle 0.2.1

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

Source distribution (sdist)

Source distribution for stringle 0.2.1
File Size Uploaded
stringle-0.2.1.tar.gz 26.5 kB Details

Built distribution (wheel)

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

Total release size: 31.8 kB

Release files / stringle-0.2.1.tar.gz

Download URL stringle-0.2.1.tar.gz
Size 26.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2db86a806056334598437d5b9c15277cb957a627bef5bda12986615c23ea32aa
BLAKE2b-256 checksum
How to use checksums
78a6dd2e8165d782296d65dcfc4b7d75284a46d0c4a9b30380ffbdc7f11481fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.3

Release files / stringle-0.2.1-py3-none-any.whl

Download URL stringle-0.2.1-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
615600bb017b313767c3ef0a7569a5cba419abb4660341d58927e7771bb0fd61
BLAKE2b-256 checksum
How to use checksums
6c3dbb908cdc21424985e7eda1b6ef99b6caced3a67090d168c5d36cca37cd1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.3

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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