textile
Textile processing for python.
What it is and what it does
textile is a Python implementation of Textile, a lightweight markup language designed to be readable in plain text while converting cleanly to HTML. It processes text with simple syntax rules—underscores for emphasis, asterisks for strong, quoted text with colons for links, and dash-prefixed lines for lists—and outputs valid HTML. The package depends on nh3 for HTML sanitization and regex for pattern matching, making it suitable for any workflow that needs to accept user-friendly text input and produce safe HTML output.
The library is stable and actively maintained, with support for Python 3.8 through 3.14. It carries no known security vulnerabilities and installs with minimal friction. The optional Pillow dependency can be added if image size checking is needed, but the core functionality requires only the two base runtime dependencies.
Use it for:
- Convert user-submitted blog posts or comments from Textile markup to HTML in a web application.
- Process documentation or README files written in Textile format into HTML for publishing.
- Build a content management system that accepts human-friendly text input and renders it as safe HTML.
- Transform plain-text notes with simple formatting into structured HTML for display or export.
- Sanitize and convert user-generated markup in forums or discussion boards.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Textile markup (a human-friendly text format) into HTML, handling formatting, lists, links, and other common web text structures.
Yes. textile is a stable, actively maintained library with no known vulnerabilities, low install friction, and a permissive license. It solves a specific, well-defined problem—converting Textile markup to HTML—with minimal dependencies. Install it if you need to accept or process Textile-formatted text in your application.
Install
textile on PyPI
pip
pip install textileuv
uv add textilepoetry
poetry add textileInstalling textile
Before you install
Low friction: pure Python wheel with only two runtime dependencies (nh3 and regex). Actively maintained with a recent release 96 days ago and ongoing repository activity.
License in practice
BSD permissive license allows use in most projects without significant restrictions.
Quickstart
pip install textile
import textile
html = textile.textile('_This_ is a *test.*')
print(html)
Requires Python 3.8 or later; regex package is not installed on PyPy and may need manual uninstallation if upgrading from an older PyPy install.
Verify before relying
- Whether regex dependency causes measurable performance or compatibility issues on CPython (PyPy users should avoid it per docs).
- Whether optional Pillow dependency for image size checking is commonly needed or rarely used.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — nh3, regex |
| Maintenance | actively maintained — 96 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 607,988/month — #5,784 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: textile-4.0.4-py3-none-any.whl
Keywords: textile, text, html markup
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
html-sanitizerSanitizes HTML fragments by enforcing an…
permissive · top 5,000 on PyPI
mammothConverts Microsoft Word .docx documents to…
permissive · top 5,000 on PyPI
html5taggerGenerates HTML5 markup programmatically using…
permissive · top 5,000 on PyPI
mistuneMistune converts Markdown text to HTML using a…
permissive · top 1,000 on PyPI
htpyhtpy lets you write HTML directly in Python…
permissive · top 15,000 on PyPI
MarkupSafeMarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
tinyhtmlRenders HTML5 safely from Python expressions…
permissive · top 15,000 on PyPI
nh3nh3 sanitizes HTML by removing unsafe tags and…
permissive · top 1,000 on PyPI
bleachBleach sanitizes untrusted HTML by escaping or…
permissive · top 1,000 on PyPI
pyth3Converts marked-up text between formats…
permissive · top 5,000 on PyPI