datasette-ports
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, process ID, attached databases and installed plugins.
Example output:
http://127.0.0.1:8007/ - v1.0a26 - PID: 42373
Directory: /Users/simon/dev/blog
Databases:
simonwillisonblog: /Users/simon/dev/blog/simonwillisonblog.db
Plugins:
datasette-llm
datasette-secrets
http://127.0.0.1:8001/ - v1.0a26 - PID: 42374
Directory: /Users/simon/dev/creatures
Databases:
creatures: /tmp/creatures.db
Plugins:
datasette-extract
datasette-llm
datasette-secrets
http://127.0.0.1:8900/ - v0.65.2 - PID: 12345
Databases:
logs: /Users/simon/Library/Application Support/io.datasette.llm/logs.db
http://0.0.0.0:8014/ - v1.0a26 - PID: 42375
Directory: /Users/simon/dev/datasette
Databases:
content: /Users/simon/dev/datasette/content.db
trees: /Users/simon/dev/datasette/trees.db
_internal
Plugins:
datasette-llm
datasette-visible-internal-db
Database paths come from each instance's /-/databases.json endpoint. Where the process working directory can be determined (via /proc/<pid>/cwd on Linux or lsof on macOS), relative paths are resolved to absolute ones. On platforms where the working directory cannot be determined the Directory: line is omitted and paths are shown as reported by Datasette.
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,
"pid": 42373,
"cwd": "/Users/simon/dev/blog",
"version": "1.0a26",
"databases": [
{"name": "simonwillisonblog", "path": "/Users/simon/dev/blog/simonwillisonblog.db"}
],
"plugins": [
"datasette-llm",
"datasette-secrets"
]
},
{
"url": "http://127.0.0.1:8900/",
"host": "127.0.0.1",
"port": 8900,
"pid": 12345,
"cwd": null,
"version": "0.65.2",
"databases": [
{"name": "logs", "path": "/Users/simon/Library/Application Support/io.datasette.llm/logs.db"}
],
"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
Metadata
Release files for datasette-ports 0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datasette_ports-0.4.tar.gz | 10.5 kB | With provenance | Details for datasette_ports-0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasette_ports-0.4-py3-none-any.whl | Python 3 | none | any | Details for datasette_ports-0.4-py3-none-any.whl |
Total release size: 19.6 kB
Release files / datasette_ports-0.4.tar.gz
| Download URL | datasette_ports-0.4.tar.gz |
|---|---|
| Size | 10.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c63fd96b8cab8def4dde76934a3ecfc217398e787e206616a8764dd41b03ffe9
|
|
BLAKE2b-256 checksum How to use checksums |
01401a18b21d4b88bd38deaec99b3d54da55795427cc859a0334ecd33a55a0a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logRelease files / datasette_ports-0.4-py3-none-any.whl
| Download URL | datasette_ports-0.4-py3-none-any.whl |
|---|---|
| Size | 9.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
226f96f8a95eae4441a011cc3e9d8ca78a0be97878d56543839170461f7f2f89
|
|
BLAKE2b-256 checksum How to use checksums |
13e00376b6a5593bdc55b3011feb11164cfc78e7f72bf2c6d18399448d9d4bb9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logSecurity for datasette-ports 0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for datasette_ports-0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 12, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.