Module for editing and formatting text.
Project description
Weneda
Modern way to edit and format text.
Installation
To install this module, run the following command:
pip install weneda
Examples
Placeholders
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.1.tar.gz
(10.4 kB
view details)
Built Distribution
weneda-0.2.1-py3-none-any.whl
(16.4 kB
view details)
File details
Details for the file weneda-0.2.1.tar.gz
.
File metadata
- Download URL: weneda-0.2.1.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 | c829fe82490e937a65e8e241850be1827f34c94d6b00923812c6a16f98ed7ed2 |
|
MD5 | 320846effed4a61abefa4b4df9db75fe |
|
BLAKE2b-256 | 89e064d683ddec84c0e48440e1ea4a1e25d8f715c0551df8017f24188f3737ee |
File details
Details for the file weneda-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: weneda-0.2.1-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 | 625eda3aae326d7d14e4ec975c5cde35883c436b38a666dcd782494eb7032b5c |
|
MD5 | 45c333152de2e4f52853144f94d11b86 |
|
BLAKE2b-256 | bd58ea9355d81d95698ce5162df70867c137c2bfb1e1e021993dfc9c8377b5a1 |