Skip to main content

A portable, extensible BB Code parser written by Condé Nast Britain

Hello, World!

from bbcondeparser import BaseTag, BaseTreeParser

class ExcitedTag(BaseTag):
    tag_name = 'excite'

    def _render(self):
        child_text = self.render_children()
        return '<b><i>{}</i></b>'.format(child_text)

class Parser(BaseTreeParser):
    tags = [ExcitedTag]


parsed = Parser("[excite]Hello, World![/excite]")

print(parsed.render())
>>> python hello_world.py
<b><i>Hello, World!</i></b>
>>>

Documentation

Further documentation is in the works, and will be present on the github page.

Metadata

Release files for bbcondeparser 1.1.0

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

Source distribution (sdist)

Source distribution for bbcondeparser 1.1.0
File Size Uploaded Provenance Actions
bbcondeparser-1.1.0.tar.gz 19.0 kB Without provenance Details for bbcondeparser-1.1.0.tar.gz

Release files / bbcondeparser-1.1.0.tar.gz

Download URL bbcondeparser-1.1.0.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
891b3df2417d2e21049069008dd25c4fdede3ea171a85c8adc66d909f868c641
BLAKE2b-256 checksum
How to use checksums
5e93971aed9c21728e0fb1c80b8adc711f199ea8f7c8249e37f4f15b6f3ba79e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.15.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.44.1 CPython/2.7.16

Security for bbcondeparser 1.1.0

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