Skip to main content

A pure Python alternative to sqlite-url ready to be used in Datasette Lite

Project description

datasette-sqlite-url-lite

PyPI Changelog Tests License

A pure Python alternative to sqlite-url ready to be used in Datasette Lite

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-sqlite-url-lite

Or add it to Datasette Lite with https://lite.datasette.io/?install=datasette-sqlite-url-lite.

Usage

This plugin adds the following SQL functions:

select url_valid('https://sqlite.org'); -- 1
select url_scheme('https://www.sqlite.org/vtab.html#usage'); -- 'https'
select url_host('https://www.sqlite.org/vtab.html#usage'); -- 'www.sqlite.org'
select url_path('https://www.sqlite.org/vtab.html#usage'); -- '/vtab.html'
select url_fragment('https://www.sqlite.org/vtab.html#usage'); -- 'usage'

Development

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

cd datasette-sqlite-url-lite
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datasette-sqlite-url-lite-0.1.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

datasette_sqlite_url_lite-0.1-py3-none-any.whl (6.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page