Skip to main content

Module for editing and formatting text.

Project description

pypi python support

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


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)

Uploaded Source

Built Distribution

weneda-0.2.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

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

Hashes for weneda-0.2.0.tar.gz
Algorithm Hash digest
SHA256 722cd7f67e8f2e53b07faf39140076627d01553fa20a153fb118e8ce4e07cdc4
MD5 6f9af31b0aa475d5db6e1f0c84995431
BLAKE2b-256 550171d21cb720e82e10aca4ef14416002149e1a2f605681b655774677cf2d40

See more details on using hashes here.

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

Hashes for weneda-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cdd7af331747aa43a5e0c951e776073c77b4816412ad14e900cff4381c8304b3
MD5 6f2d7faa4c6215be6d04e5ace0d7781b
BLAKE2b-256 8b6a4d7ac84ea421a46374ca12fab616efc29ed8971e51b84ad8d1bd216a2a51

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