Skip to main content

text-region-parser

Parse regions in your Markdown/text files!

PyPI - Project version Coverage PyPI - Downloads Pepy - Total Downloads PyPI - Python Version PyPI - License

You can dynamically parse and update regions in your Markdown/text files like this:

Description of the project

<!-- region:name argument=value -->
This is a region with autogenerated content
<!-- endregion:name -->

End of the file

Installation

pip install text-region-parser
# or
uv add text-region-parser
# or
poetry add text-region-parser

Usage

from pathlib import Path
from typing import TypedDict

from text_region_parser import RegionConstructor


class ScopeOptions(TypedDict):
    name: str
    level: str


constructor = RegionConstructor()

@constructor.add_parser("scope", options_type=ScopeOptions)
def create_scope_content(options: ScopeOptions) -> str:
    """Create region `scope` with options."""
    return f"Scope: {options['name']} with level {options['level']}"


# Parse the content.
file_path = Path("README.md")
constructor.update_files_data(file_path)
print(file_path.read_text())

License

MIT

Metadata

Release files for text-region-parser 0.1.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 text-region-parser 0.1.2
File Size Uploaded Provenance Actions
text_region_parser-0.1.2.tar.gz 10.3 MB Without provenance Details for text_region_parser-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for text-region-parser 0.1.2
File Interpreter ABI Platform Actions
text_region_parser-0.1.2-py3-none-any.whl Python 3 none any Details for text_region_parser-0.1.2-py3-none-any.whl

Total release size: 10.3 MB

Release files / text_region_parser-0.1.2.tar.gz

Download URL text_region_parser-0.1.2.tar.gz
Size 10.3 MB
Tags Source
SHA-256 checksum
How to use checksums
c9392700e72be71a8e37553d73cf3a9ddf8d50ccf92b34212f32de2d1a41ea56
BLAKE2b-256 checksum
How to use checksums
8a9ba885790dc91122a868aebce2cfb7719c10dc188da3b225b2776f75ae33ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / text_region_parser-0.1.2-py3-none-any.whl

Download URL text_region_parser-0.1.2-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e9dc510d1ab525fca744c13bb1cb056a07ab13d442fb9329b4576139670ebc8
BLAKE2b-256 checksum
How to use checksums
70a91858e6114644964f1310292c924ab145268964c5455014dda38f955ceb3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for text-region-parser 0.1.2

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