Skip to main content
Travis CI status

This module provides a wrapper around various text markup languages.

Available by default are Markdown, reStructuredText and Textile, 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]
'http://docutils.sourceforge.net/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
<div class="document" id="hello-world">
<h1 class="title">Hello, world!</h1>
<p>This is an example <strong>reStructuredText</strong> document.</p>
</div>

The release version can be downloaded from PyPI. The source code is hosted on GitHub.

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

python3 setup.py build_sphinx

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Markups-2.0.1.tar.gz (17.0 kB view details)

Uploaded Source

File details

Details for the file Markups-2.0.1.tar.gz.

File metadata

  • Download URL: Markups-2.0.1.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for Markups-2.0.1.tar.gz
Algorithm Hash digest
SHA256 ef65593afe187cd1135da1a9c9f6dde2b0ecd2cda4895790628d270e8b0b7030
MD5 2798c27f880beb84d46a53e41b729b79
BLAKE2b-256 87f93acf0b6d96564108ba96f06e6ccdc7722ade412c90c641d5160c175595cb

See more details on using hashes here.

Release history Release notifications | RSS feed

4.1.1

2 files

4.1.0

2 files

4.0.0

2 files

3.1.3

2 files

3.1.2

2 files

3.1.1

2 files

3.1.0

2 files

3.0.0

2 files

This release

2.0.1 This release

1 file

2.0.0

1 file

1.0.1

1 file

1.0.0

1 file

0.6.3

1 file

0.6.2

0.6.1

1 file

0.6.0

1 file

0.5.2

1 file

0.5.1

1 file

0.5.0

1 file

0.4

1 file

0.3

1 file

0.2.4

1 file

0.2.3

1 file

0.2.2

1 file

0.2.1

1 file

0.2

1 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