Module for editing and formatting text.
Project description
Weneda
Python module for editing and styling text.
Installation
To install this module, run the following command:
pip install weneda
Examples
Placeholders
import asyncio
import asyncio
from weneda import Formatter, placeholder
class MyFormatter(Formatter):
@placeholder(
name="upper",
syntax="upper_<text>",
pattern=r"upper_(?P<text>.*)"
)
async def upper_handler(self, text: str) -> str:
return text.upper()
async def main():
formatter = MyFormatter()
result = await formatter.format("Hello {upper_world}")
print(result) # Hello WORLD
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
weneda-0.2.0.tar.gz
(10.4 kB
view details)
Built Distribution
weneda-0.2.0-py3-none-any.whl
(16.4 kB
view details)
File details
Details for the file weneda-0.2.0.tar.gz
.
File metadata
- Download URL: weneda-0.2.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 722cd7f67e8f2e53b07faf39140076627d01553fa20a153fb118e8ce4e07cdc4 |
|
MD5 | 6f9af31b0aa475d5db6e1f0c84995431 |
|
BLAKE2b-256 | 550171d21cb720e82e10aca4ef14416002149e1a2f605681b655774677cf2d40 |
File details
Details for the file weneda-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: weneda-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.3 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd7af331747aa43a5e0c951e776073c77b4816412ad14e900cff4381c8304b3 |
|
MD5 | 6f2d7faa4c6215be6d04e5ace0d7781b |
|
BLAKE2b-256 | 8b6a4d7ac84ea421a46374ca12fab616efc29ed8971e51b84ad8d1bd216a2a51 |