Skip to main content

datasette-simple-html

PyPI Changelog Tests License

Datasette SQL functions for very simple HTML operations

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-simple-html

Usage

This plugin provides the following SQL functions:

html_strip_tags(text)

Returns the text with any <...> tags removed.

html_escape(text)

Escapes any HTML special characters in the text, e.g. > becomes &gt;. Uses html.escape(text, quote=True) from the Python standard library.

html_unescape(text)

Unescapes any HTML special characters, so &gt; becomes >. Also handles numeric entities, so &#x27; becomes '. Uses html.unescape(text) from the Python standard library.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-simple-html
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Metadata

Release files for datasette-simple-html 0.2

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

Source distribution (sdist)

Source distribution for datasette-simple-html 0.2
File Size Uploaded
datasette-simple-html-0.2.tar.gz 6.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datasette-simple-html 0.2
File Interpreter ABI Platform
datasette_simple_html-0.2-py3-none-any.whl Python 3 none any Details

Total release size: 13.7 kB

Release files / datasette-simple-html-0.2.tar.gz

Download URL datasette-simple-html-0.2.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
09c05feff154d40415b61eb4adb7be8d473cb21f32563c10a961c19dcfcb8089
BLAKE2b-256 checksum
How to use checksums
63d05862c7090f9faf1c5e193b44cbbbd0bb3f5facb667d93b98cab03205eac7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / datasette_simple_html-0.2-py3-none-any.whl

Download URL datasette_simple_html-0.2-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bc6f2502bf935a16cda2c1d622ed8c4386bc830877f982409580658c20b5507a
BLAKE2b-256 checksum
How to use checksums
66ac4c2af864b63b83365b05e9916ee49b995ddd527c33996eca634c450a93d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

0.2 This release

2 release files

0.1

2 release files

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