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

Release files for textile 4.0.4

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.4
File Size Uploaded
textile-4.0.4.tar.gz 57.3 kB Details

Built distribution (wheel)

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

Total release size: 88.0 kB

Release files / textile-4.0.4.tar.gz

Download URL textile-4.0.4.tar.gz
Size 57.3 kB
Tags Source
SHA-256 checksum
How to use checksums
89428d848712b041cf4e354c0a6332339810d519a5c3109cb42a0c594f882a0d
BLAKE2b-256 checksum
How to use checksums
97323126869580204c8b8fe019a5e43f70e4f36e90d0f530033be2746c2c7a1e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

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

Download URL textile-4.0.4-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a09e3696405b82c79e1323ce892c78975943f3ee681b0570dab7878407434da7
BLAKE2b-256 checksum
How to use checksums
c10a4c58eea9ef7ccb96e588fddcb9540c1657f944028f8901931003b498b1c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

4.0.4 This release

2 release files

4.0.3

2 release files

4.0.2

2 release files

4.0.1

2 release files

4.0.0

2 release files

3.0.4

2 release files

3.0.3

2 release files

3.0.2

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.3.16

2 release files

2.3.15

2 release files

2.3.14

2 release files

2.3.13

2 release files

2.3.11

2 release files

2.3.10

2 release files

2.3.9

2 release files

2.3.8

2 release files

2.3.7

2 release files

2.3.6

2 release files

2.3.5

2 release files

2.3.4

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.3.0

2 release files

2.2.2

2 release files

2.2.1

2 release files

2.2.0

2 release files

2.1.8

2 release files

2.1.5

1 release file

2.1.4

1 release file

2.1.3

1 release file

2.1.2

1 release file

2.1.1

1 release file

2.1.0

1 release file

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