dtool-dserver
A dtool storage broker that accesses datasets through a dserver instance using signed URLs.
This broker allows users to access datasets stored on S3, Azure, or other backends without needing direct credentials for those backends. Instead, the dserver generates time-limited signed URLs on behalf of the user.
Features
Read datasets through dserver signed URLs
Create new datasets through dserver signed URLs
Automatic caching of downloaded items
Support for all dtool operations (ls, cp, info, item fetch, etc.)
Backend-agnostic (works with any storage backend dserver supports)
Getting started
Install the dtool command line tools with this broker:
pip install "dtool>=3.28" dtool-dserver
Log in to your dserver, once per machine, with the address of its web interface as you see it in your browser (or the address of the dserver itself):
dtool dserver login https://dtool.example.com
With OAuth2 (e.g. ORCID), dtool opens the dserver web interface in your browser and shows a short code. Sign in there; the web interface asks you to approve “dtool on <your machine>”. Check that the code matches the one in your terminal and click Approve. On a remote machine (e.g. over SSH), add --no-browser and open the printed link on any other device. With LDAP, enter your username and password instead.
Use dserver:// URIs with the same address with any dtool command, as the web interface shows them (Copy URI):
dtool ls dserver://dtool.example.com/ dtool ls dserver://dtool.example.com/s3/my-bucket dtool cp ./my-dataset dserver://dtool.example.com/s3/my-bucket dtool cp dserver://dtool.example.com/s3/my-bucket/<uuid> ./downloads
The first lists all datasets you have access to, with their URIs.
You need no credentials for the storage (S3, Azure) itself: dserver hands out signed URLs. What you can list and download (search permission) and upload (register permission) for a storage location is decided by the dserver’s administrator.
Your login is kept in the dtool config file and renewed automatically while you use it, for up to a week (depending on the dserver); then run dtool dserver login again. See Authentication for details.
Installation
pip install "dtool>=3.28" dtool-dserver
dtool installs the command line tools (dtool cp, dtool ls, …); 3.28 or later is needed on Python 3.12 and later (dtool-cli 0.7.2). The broker alone, without command line, is pip install dtool-dserver.
URI Format
The URI format encodes both the dserver and the backend storage location:
dserver://<server>/<backend>/<bucket_or_container>/<uuid>
<server> is the host (and port) of the dserver, or of its web interface if you logged in with that. dserver://<server>/ stands for all storage locations you can search, for dtool ls.
Examples:
dserver://localhost:5000/s3/my-bucket/550e8400-e29b-41d4-a716-446655440000
dserver://dserver.example.com/azure/my-container/dataset-uuid
Usage
List datasets:
dtool ls dserver://localhost:5000/s3/my-bucket/
Copy a dataset to local storage:
dtool cp dserver://localhost:5000/s3/my-bucket/uuid /local/path/
Create a new dataset:
dtool create dserver://localhost:5000/s3/my-bucket/new-dataset
Authentication
Log in once per dserver; the token is stored in the dtool config file (readable only by you) and used for all dserver://<server>/... URIs:
dtool dserver login dserver.example.com
The address can also be that of the dserver web interface, including a URL copied from the browser (e.g. https://dtool.example.com/): dtool reads the dserver the web interface uses from its page and logs in there. The login is stored for the dserver, and the web interface’s host stands for it, so dserver:// URIs with either host work.
The web page decides where your password or token goes, so dtool asks before logging in if the dserver is on another host than the web interface, the page redirected to another host, or the page was fetched over plain http (except on localhost). --yes skips the question, e.g. in scripts. Only dtool dserver login makes such a connection: a dserver:// URI with a host you did not log in to is never looked up this way.
How you log in depends on the dserver:
OAuth2 (e.g. ORCID): dtool shows a short code and a link. Open the link in a web browser, on this or any other machine (handy over SSH), log in as usual and approve the code. Use --no-browser to not open a browser automatically.
LDAP: enter your username and password (--username skips the username prompt).
If a dserver offers both, choose with --method oauth2 or --method ldap. You must be registered as a user in the dserver; ask its administrator otherwise.
Tokens are valid for a day (depending on the dserver) and are refreshed automatically when they are about to expire, up to the dserver’s maximum session length (by default a week after logging in). After that, log in again.
Other commands:
dtool dserver status # servers you are logged in to dtool dserver logout dserver.example.com # remove the stored token
Setting up a dserver for command-line logins
For administrators. dtool dserver login needs on the server side:
OAuth2 logins: dserver-token-generator-plugin-oauth2 with the device authorization flow. It stores pending logins in dserver’s SQL database; create its table with flask db migrate and flask db upgrade after installing or upgrading the plugin. OAUTH2_DEVICE_VERIFICATION_URL (or OAUTH2_FRONTEND_URL) must point to the web interface, where users approve logins.
The web interface: a dtool-lookup-webapp version with the login approval dialog (newer than 0.4.0). Versions that name their dserver in the page (<meta name="dserver-url">, from VUE_APP_DTOOL_LOOKUP_SERVER_URL) let users log in with the address of the web interface. Point it to the plugin’s endpoints under /auth/oauth2 with VUE_APP_OAUTH2_LOGIN_URL (.../login), VUE_APP_DTOOL_LOOKUP_SERVER_TOKEN_GENERATOR_URL (.../token) and VUE_APP_DTOOL_LOOKUP_SERVER_AUTH_LOGOUT_URL (.../logout); the device approval endpoints (.../device) are found by default.
LDAP logins: dserver-token-generator-plugin-ldap.
Token claims: dserver accepts only tokens with audience and issuer dserver by default (JWT_DECODE_AUDIENCE / JWT_DECODE_ISSUER); both plugins issue them.
Session length: tokens last JWT_TOKEN_EXPIRY_HOURS (default 24) and are refreshed up to JWT_MAX_SESSION_HOURS (default 168) after the browser login.
Users and permissions: users need search permission on a base URI to list and download, register permission to upload (flask user search_permission / flask user register_permission, or automatically on first login where the plugin provisions users).
https: the CLI contacts dservers over https (except localhost).
Advanced configuration (optional)
Nothing needs to be configured: dtool dserver login stores everything dtool needs. The following settings are for special cases.
Tokens without logging in, e.g. in scripts or CI. For a dserver host[:port], the first of these is used (environment or dtool config file ~/.config/dtool/dtool.json):
DSERVER_TOKEN_<host[:port]>; this is where dtool dserver login stores the token
DSERVER_TOKEN, for all dservers
DSERVER_TOKEN_FILE, a file containing the token, for all dservers
Tokens from environment variables are never refreshed or stored. In the web interface (dtool-lookup-webapp), “Copy token to clipboard” in the user menu gives you a token, e.g. for DSERVER_TOKEN.
Plain http: dserver is contacted over https, except for localhost, 127.0.0.1 and ::1. For a dserver that only serves plain http, e.g. on your local network, log in with dtool dserver login http://<server>; dtool remembers to use http for this server (DSERVER_PROTOCOL_<host[:port]> in the dtool config file) until you log in with https:// or log out. Your password and token are then sent unencrypted, so do this only for a dserver you trust on a network you trust. DSERVER_PROTOCOL sets the protocol for all dservers.
dserver under a path: DSERVER_URL_<host[:port]> is the base URL of the dserver API that dserver://<host[:port]>/... URIs go to, for a dserver served under a path, e.g. https://example.org/dserver. dtool dserver login stores it when you log in to such a dserver, and for the host of a web interface you log in with. It takes precedence over DSERVER_PROTOCOL_<host[:port]>.
Download cache: downloaded items are cached in dtool-dserver-cache in the system’s temporary directory; set DSERVER_CACHE_DIR (environment or dtool config file) to use another directory.
Metadata
Release files for dtool-dserver 0.2.0
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 |
|---|---|---|---|---|
| dtool_dserver-0.2.0.tar.gz | 40.0 kB | With provenance | Details for dtool_dserver-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dtool_dserver-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for dtool_dserver-0.2.0-py3-none-any.whl |
Total release size: 63.5 kB
Release files / dtool_dserver-0.2.0.tar.gz
| Download URL | dtool_dserver-0.2.0.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dacf37eb781232f0ef97db76ed1d3fbdbe4fbf6165250b462d874ad7d30632bd
|
|
BLAKE2b-256 checksum How to use checksums |
43831fc284e302d17694f8d5549b22f46ad60aba470938c1d9cf1e421b92557d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 26, 2026.
Transparency logRelease files / dtool_dserver-0.2.0-py3-none-any.whl
| Download URL | dtool_dserver-0.2.0-py3-none-any.whl |
|---|---|
| Size | 23.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2602d841417da6e6b5ef036bd26c635747988ece2b7c56641404f91b449d9a35
|
|
BLAKE2b-256 checksum How to use checksums |
d7a07291a922e5d86fa6ff7f9acf722dc25a37e83a1a337dfaf1a47879da533b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 26, 2026.
Transparency logSecurity for dtool-dserver 0.2.0
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 dtool_dserver-0.2.0.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 Nov 26, 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.