Skip to main content

Find all currently running Datasette instances and list their ports

Project description

datasette-ports

PyPI Changelog Tests License

Find all currently running Datasette instances on your machine and list their ports, databases, versions and plugins.

Installation

Install this as a plugin in the same environment as Datasette.

datasette install datasette-ports

Or run it directly using uvx:

uvx datasette-ports

Or install it as a standalone tool:

uv tool install datasette-ports
datasette-ports

Usage

If installed as a Datasette plugin:

datasette ports

Or as a standalone command:

datasette-ports

This uses lsof to find all Python processes listening on TCP ports, then probes each one to check if it is a Datasette instance. For each instance found it displays the URL, Datasette version, attached databases and installed plugins.

Example output:

http://127.0.0.1:8007/ - v1.0a26
  Databases: simonwillisonblog
  Plugins: datasette-llm, datasette-secrets
http://127.0.0.1:8001/ - v1.0a26
  Databases: creatures
  Plugins: datasette-extract, datasette-llm, datasette-secrets
http://127.0.0.1:8900/ - v0.65.2
  Databases: logs
http://0.0.0.0:8014/ - v1.0a26
  Databases: content, trees, _internal
  Plugins: datasette-llm, datasette-visible-internal-db

JSON output

Use --json to get machine-readable output:

datasette ports --json
# or
datasette-ports --json
[
  {
    "url": "http://127.0.0.1:8007/",
    "host": "127.0.0.1",
    "port": 8007,
    "version": "1.0a26",
    "databases": [
      "simonwillisonblog"
    ],
    "plugins": [
      "datasette-llm",
      "datasette-secrets"
    ]
  },
  {
    "url": "http://127.0.0.1:8900/",
    "host": "127.0.0.1",
    "port": 8900,
    "version": "0.65.2",
    "databases": [
      "logs"
    ],
    "plugins": []
  }
]

Development

To set up this project locally, first checkout the code. You can confirm it is available like this:

cd datasette-ports
uv run datasette-ports --help
# Or:
uv run datasette ports --help

To run the tests:

uv run 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_ports-0.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

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

datasette_ports-0.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file datasette_ports-0.2.tar.gz.

File metadata

  • Download URL: datasette_ports-0.2.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datasette_ports-0.2.tar.gz
Algorithm Hash digest
SHA256 bc33b8997aed3c90e1f3007f2f290138b9a14ae861b77560afbcfb178fe25e6c
MD5 e1f3ccaa44305a3c31fecee2baa85341
BLAKE2b-256 b322f393112ea24a44296e360c8ff533900673b04d890138f1e9b0fcf1593b4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_ports-0.2.tar.gz:

Publisher: publish.yml on datasette/datasette-ports

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_ports-0.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for datasette_ports-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c80fac0b34a08261a1f2676c10839109cbe9713db8d752af41b968911c31aef9
MD5 86c8a6f98c873836ffcee0d9c4612cb9
BLAKE2b-256 9bf7c177a3fcab9eb7b1e0a959effe7ed21b6850fa543c226f24d80a8b89b838

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_ports-0.2-py3-none-any.whl:

Publisher: publish.yml on datasette/datasette-ports

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