Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

textile

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

textile

Textile processing for python.

  • 4.0.3
  • PyPI
  • Socket score

Maintainers
1

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

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc