Skip to main content
GitHub Actions status Coverage status ReadTheDocs status

This module provides a wrapper around various text markup languages.

Available by default are Markdown, reStructuredText, Textile and AsciiDoc, but you can easily add your own markups.

Usage example:

>>> import markups
>>> markup = markups.get_markup_for_file_name("myfile.rst")
>>> markup.name
'reStructuredText'
>>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
'https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html'
>>> text = """
... Hello, world!
... =============
...
... This is an example **reStructuredText** document.
... """
>>> result = markup.convert(text)
>>> result.get_document_title()
'Hello, world!'
>>> print(result.get_document_body())  # doctest: +NORMALIZE_WHITESPACE
<main id="hello-world">
<h1 class="title" data-posmap="3">Hello, world!</h1>
<p data-posmap="5">This is an example <strong>reStructuredText</strong> document.</p>
</main>

The release version can be downloaded from PyPI or installed using:

pip install Markups

The source code is hosted on GitHub.

The documentation is available online or can be generated from source by installing Sphinx and running:

python3 -m sphinx docs build/sphinx/html

Metadata

Release files for Markups 4.1.1

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

Source distribution (sdist)

Source distribution for Markups 4.1.1
File Size Uploaded
markups-4.1.1.tar.gz 23.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Markups 4.1.1
File Interpreter ABI Platform
markups-4.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.6 kB

Release files / markups-4.1.1.tar.gz

Download URL markups-4.1.1.tar.gz
Size 23.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d0284b14fe046037cb0473f08d5c63556042c14c5ed65379e81982afeb55bc21
BLAKE2b-256 checksum
How to use checksums
23e0d919050e3450491da92931a197c34bef4c1c63f5b174690ec197e5bb9804
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2025.

Transparency log

Release files / markups-4.1.1-py3-none-any.whl

Download URL markups-4.1.1-py3-none-any.whl
Size 14.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e52f3a4fd1a0dfd24e2ff71afd29134b0fc0534f393e9581f0881575ee0339ba
BLAKE2b-256 checksum
How to use checksums
de47061b7489db19ba48de5913c1896b525d6d00ed358e9b504a1a9af95a3485
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 29, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

4.1.1 This release

2 release files

4.1.0

2 release files

4.0.0

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.1

1 release file

2.0.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

0.6.3

1 release file

0.6.2

0.6.1

1 release file

0.6.0

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4

1 release file

0.3

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

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