No project description provided
Project description
datasette-short-links
A URL link shortener for Datasette. Work in progress!
Installation
This plugin requires an alpha version of Datasette 1.0, because it uses Datasette's internal database introduced in 1.0a5
.
pip install datasette==1.0a5
After than, you can install this plugin in the same environment as Datasette.
datasette install datasette-short-links
Usage
Once installed, the bottom of each page with have a "Copy URL" button at the bottom of that page. That URL will link directly back to the same page.
A short URL will look something like: http://localhost:8001/-/l/01h973jcqspxrhzy00zebhx748
To take full advantage of this plugin, use a persistent internal database to store links even after your Datasette instance exits. This can be done with the --internal
flag:
datasette --internal internal.db my_data.db
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-short-links
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for datasette-short-links-0.0.1a3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a0e32b95f2e3fa1c6da01a8624d7689b2a095c9c226cc3ebe3343ba096cfc5e |
|
MD5 | 909cde372b8c83a3b31daa3c3ac67153 |
|
BLAKE2b-256 | df0e3110f8d3e6d54e65acb3b745088235f1df21d8622e9ee287fef9f2cff514 |
Hashes for datasette_short_links-0.0.1a3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b1563b1576dd6dcfaf58d438e2f1f7d8bb2172bafb7d9cff35558714b34422c |
|
MD5 | 911c8f20e8e723d3e0945e369c93baad |
|
BLAKE2b-256 | c3af623441563493d78aa3201498c1aa6c535bc9b76dae7a03ea44ddf233b3c3 |