Skip to main content

quart-cmark

Add CommonMark processing filter to your Quart app, using paka.cmark because why should I do any work?

paka.cmark uses the commonmark/cmark reference implementation, so it should render anything outlined in the CommonMark Spec lickety-split.

Source code may be found at Gitlab.

Docs at readthedocs.

Installation

pip install Quart-Cmark

Usage

Script

from quart_cmark import Cmark
cm = Cmark(app)

or, if you are using factory pattern:

from quart_cmark import Cmark
cm = Cmark()
cm.init_app(app)

Create routes in the usual way:

@app.route("/markdown-fest")
async def markdown_fest():
    mycm = u"Hello, *commonmark* block."
    return await render_template("markdown-fest.html", mycm=mycm) 

Template

Inline-style

<html>
{{mycm|commonmark}}
</html>

Block-style

<html>
{% filter commonmark %}
{{mycm}}
{% endfilter %}
</html>

Autoescape

Jinja2's autoescape works when declared at init. See tests for examples.

Tests

pytest

Metadata

Release files for Quart-Cmark 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 Quart-Cmark 0.1.2
File Size Uploaded Provenance
Quart-Cmark-0.1.2.tar.gz 4.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for Quart-Cmark 0.1.2
File Interpreter ABI Platform
Quart_Cmark-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 kB

Release files / Quart-Cmark-0.1.2.tar.gz

Download URL Quart-Cmark-0.1.2.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0ad680c3959e10bf1704385dc3e51fcc37f69ee87cfb36303c0528276ba3fa1b
BLAKE2b-256 checksum
How to use checksums
c29ddc59a84105e8aef039e17099b72788f29e3f6fe5f68ee66317c4c701c570
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

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

Download URL Quart_Cmark-0.1.2-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ec8cc8cfa8afbd32df0d55a5682cbf0f329e902061788b25d4bb1c36717e5d54
BLAKE2b-256 checksum
How to use checksums
a2ac4bf3528db3dacc2267e22aa085575cbb4d9aaf593a2a98172223023c2f7d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.4

Security for Quart-Cmark 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