Skip to main content

python-textile

python-textile

python-textile is a Python port of Textile, Dean Allen’s humane web text generator.

Installation

pip install textile

Dependencies:

  • nh3
  • regex (The regex package causes problems with PyPy, and is not installed as a dependency in such environments. If you are upgrading a textile install on PyPy which had regex previously included, you may need to uninstall it.)

Optional dependencies include:

  • PIL/Pillow (for checking image sizes). If needed, install via pip install 'textile[imagesize]'

Usage

import textile
>>> s = """
... _This_ is a *test.*
...
... * One
... * Two
... * Three
...
... Link to "Slashdot":http://slashdot.org/
... """
>>> html = textile.textile(s)
>>> print html
<p><em>This</em> is a <strong>test.</strong></p>

<ul>
	<li>One</li>
	<li>Two</li>
	<li>Three</li>
</ul>

<p>Link to <a href="http://slashdot.org/">Slashdot</a></p>
>>>

Notes:

  • Active development supports Python 3.8 or later.

Running Tests

To run the test suite, use pytest. `pytest-cov` is required as well.

When textile is installed locally:

pytest

When textile is not installed locally:

PYTHONPATH=. pytest

Metadata

Release files for textile 4.0.5

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

Source distribution (sdist)

Source distribution for textile 4.0.5
File Size Uploaded Provenance Actions
textile-4.0.5.tar.gz 59.1 kB Without provenance Details for textile-4.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for textile 4.0.5
File Interpreter ABI Platform Actions
textile-4.0.5-py3-none-any.whl Python 3 none any Details for textile-4.0.5-py3-none-any.whl

Total release size: 89.9 kB

Release files / textile-4.0.5.tar.gz

Download URL textile-4.0.5.tar.gz
Size 59.1 kB
Tags Source
SHA-256 checksum
How to use checksums
640bb9e99f51209986e98442e50adcddaf6ec8ed1da7e4317bf2662c2fb260d7
BLAKE2b-256 checksum
How to use checksums
3d6e232df5b68957ae3f0605b2958a498808af0156662e970fa8e12f6250bf12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Release files / textile-4.0.5-py3-none-any.whl

Download URL textile-4.0.5-py3-none-any.whl
Size 30.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
95ecd6bc944e7be2c410fc2bf854dc689d761fbf5e72a47682811d87018b9cf2
BLAKE2b-256 checksum
How to use checksums
edab1d517f5ac54980a5b0d571e40ed97947e688fdc86127946b2f5aa8d3698d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.15.2

Security for textile 4.0.5

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.

Release history Release notifications | RSS feed

This release

4.0.5 This release

2 release files No provenance

2.0.10

2.0.9

2.0.8

2.0.7

2.0.6

2.0.5

2.0.4

2.0.3

2.0.2

2.0.1

2

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