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
Building JavaScript from TypeScript
This plugin includes TypeScript/TSX source files in datasette_pins/frontend/ that need to be compiled to JavaScript. If you modify any .ts or .tsx files, you'll need to rebuild the JavaScript.
First install the Node.js dependencies:
npm install
Then build the JavaScript using just:
just js
This uses esbuild to compile and minify the TypeScript files into datasette_pins/static/.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datasette_pins-0.1a6.tar.gz.
File metadata
- Download URL: datasette_pins-0.1a6.tar.gz
- Upload date:
- Size: 33.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac58bfbe2b02c9df7dd743970c943a0235a4824b8fd3403f8ecb0b4f68311cc6
|
|
| MD5 |
3fcb47577477f5bdef8b05e865dac161
|
|
| BLAKE2b-256 |
cb00e4595b930f911f1e4aeaeac98eb116fa345810bb882969ad96f745a6e53f
|
Provenance
The following attestation bundles were made for datasette_pins-0.1a6.tar.gz:
Publisher:
publish.yml on datasette/datasette-pins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_pins-0.1a6.tar.gz -
Subject digest:
ac58bfbe2b02c9df7dd743970c943a0235a4824b8fd3403f8ecb0b4f68311cc6 - Sigstore transparency entry: 693175327
- Sigstore integration time:
-
Permalink:
datasette/datasette-pins@5357e0e873aa9260e659e004e02a740f805ff947 -
Branch / Tag:
refs/tags/0.1a6 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5357e0e873aa9260e659e004e02a740f805ff947 -
Trigger Event:
release
-
Statement type:
File details
Details for the file datasette_pins-0.1a6-py3-none-any.whl.
File metadata
- Download URL: datasette_pins-0.1a6-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2c7c73b2371392f5f555142a9b57e80371534667acfc2330022b116201a18cf
|
|
| MD5 |
7c7b24065f65f93626693e16c2922f45
|
|
| BLAKE2b-256 |
30215ba323b1d6823f27bcabb2877eaa7a2bddaa43b1b5bf1d82f1b0136a294a
|
Provenance
The following attestation bundles were made for datasette_pins-0.1a6-py3-none-any.whl:
Publisher:
publish.yml on datasette/datasette-pins
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
datasette_pins-0.1a6-py3-none-any.whl -
Subject digest:
c2c7c73b2371392f5f555142a9b57e80371534667acfc2330022b116201a18cf - Sigstore transparency entry: 693175328
- Sigstore integration time:
-
Permalink:
datasette/datasette-pins@5357e0e873aa9260e659e004e02a740f805ff947 -
Branch / Tag:
refs/tags/0.1a6 - Owner: https://github.com/datasette
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5357e0e873aa9260e659e004e02a740f805ff947 -
Trigger Event:
release
-
Statement type: