Skip to main content

Pin databases, tables, and other items to the Datasette homepage

Project description

datasette-pins

PyPI Changelog Tests License

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


Download files

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

Source Distribution

datasette_pins-0.1a5.tar.gz (38.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datasette_pins-0.1a5-py3-none-any.whl (41.5 kB view details)

Uploaded Python 3

File details

Details for the file datasette_pins-0.1a5.tar.gz.

File metadata

  • Download URL: datasette_pins-0.1a5.tar.gz
  • Upload date:
  • Size: 38.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datasette_pins-0.1a5.tar.gz
Algorithm Hash digest
SHA256 9e006ba3b91041b06c4acdba1852db9a35c05928a308592e4c85b0bfbbe846bc
MD5 6e8a3345003179f78d316856cb1f5df5
BLAKE2b-256 026ca1e5038af16c1e2facfbc9d0cee13a20440fe25098890ec0c164d6ca4172

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_pins-0.1a5.tar.gz:

Publisher: publish.yml on datasette/datasette-pins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datasette_pins-0.1a5-py3-none-any.whl.

File metadata

  • Download URL: datasette_pins-0.1a5-py3-none-any.whl
  • Upload date:
  • Size: 41.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datasette_pins-0.1a5-py3-none-any.whl
Algorithm Hash digest
SHA256 5f2aa1039bbbcc08d8e76fe47059da37280228e0cbc1d753d8574ed6716e389b
MD5 463581c6a43b5b3e56a393f254b4b502
BLAKE2b-256 fefb3a6564a4f6016168b6f6fbb1e3fb1e124fd51a16895d13a6e08e0478acd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_pins-0.1a5-py3-none-any.whl:

Publisher: publish.yml on datasette/datasette-pins

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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