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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file datasette-sqlite-url-lite-0.1.tar.gz.

File metadata

File hashes

Hashes for datasette-sqlite-url-lite-0.1.tar.gz
Algorithm Hash digest
SHA256 c906348faf14b7a18b71238c7f8b60f2da5ad5ead95c49a904794014026a8b23
MD5 18188838b60882ad44e59a96ad902f4d
BLAKE2b-256 5982b6b54a4573cdb0b8a437fb74615624d537b6cf92f0164e0eb13647d1574f

See more details on using hashes here.

File details

Details for the file datasette_sqlite_url_lite-0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_sqlite_url_lite-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f502b4529ceddb151e10b9779ca801699b6bf84a44e88130d880d958d3695ead
MD5 9996735dcd3b4a5e012ee71a498c3574
BLAKE2b-256 a792eb9280ceb81a5935a176c175807bad91285d5aca8c49cf40ccc5ab699bb0

See more details on using hashes here.

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