Pin databases, tables, and other items to the Datasette homepage
Project description
datasette-pins
Pin databases, tables, queries, and more to the Datasette homepage!
Installation
datasette-pins
requires a recent 1.0 alpha version of Datasette to work.
pip install datasette>=1.0a13
Afterwards, install this plugin in the same environment as Datasette.
datasette install datasette-pins
Configuration
datasette-pins
stores pins in the internal database. This database runs in-memory by default, which means your pins will be lost if you restart the server. To avoid that, start Datasette with the --internal
option to specify where that database should be stored on disk:
datasette mydatabase.db --internal internal.db
datasette-pins
has two permissions datasette-pins-write
and
datasette-pins-read
. Actors with the datasette-pins-write
permissions can
pin and reorder items, while actors with datasette-pins-read
permissions can
only view pinned items.
Here's an example
datasette.yaml
file
where all actors can view pins, but only the root
actor can pin items:
permissions:
datasette-pins-read:
id: "*"
unauthenticated: true
datasette-pins-write:
id: "root"
Usage
Once logged in, the root
use will see new pin/unpin option under the database,
table, and query actions menu:
Development
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-pins
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
File details
Details for the file datasette_pins-0.1a4.tar.gz
.
File metadata
- Download URL: datasette_pins-0.1a4.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09c80170c10b0d0990fcd58cfb0fc9e5fcdea74d18f1ea00695afec5b03ee0b7 |
|
MD5 | 8ecec072519f86ef96258d7ea97a9eae |
|
BLAKE2b-256 | 34ff07d0ee2c17e4870caec6ecfd68ac240adf8b6509c3c1a9fbea04df8af940 |
File details
Details for the file datasette_pins-0.1a4-py3-none-any.whl
.
File metadata
- Download URL: datasette_pins-0.1a4-py3-none-any.whl
- Upload date:
- Size: 41.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 035ffa9cd18cfa4cc246fc960f50ae86ea093c33803dfecd49ff4078c3df3e90 |
|
MD5 | 653e77dbeaa932951f45140929207f44 |
|
BLAKE2b-256 | 59ffcafdda87f0f821ebb21852855665c7da26d2b5b76df889ed2381517e4d98 |