Skip to main content

selltostate-cli — selltostate

Official command-line client for the Sell to State government-contracts data API (app.selltostate.com). Python port of the npm package @selltostate/cli: the same commands, flags, output and exit codes. Standard library only, Python 3.9+.

pipx install selltostate-cli      # or: pip install selltostate-cli / uv tool install selltostate-cli
selltostate auth login            # prompts for the key, checks it with /whoami, saves it
selltostate search "IT consulting" --country singapore --year-min 2026 --format json

Get a key at https://app.selltostate.com/dashboard (Settings -> API keys).

Auth and configuration

The CLI sends a dashboard API key as the x-api-key header. Resolution order:

  1. --api-key / --api-url flags
  2. STS_API_KEY / STS_API_URL environment variables
  3. ~/.config/selltostate/config.json (written by auth login, mode 0600; honours XDG_CONFIG_HOME)
  4. Default API URL https://app.selltostate.com

The npm and the Python CLI share this config file.

Commands

Command Endpoint
whoami GET /api/v1/whoami
search <q> [filters] GET /api/v1/search
awards [filters] GET /api/v1/awards
get buyer|supplier|tender|sector <id> [--country] GET /api/v1/{buyers|suppliers|tenders|sectors}/<id> (tender: award_id; the reply has requirements)
sectors, suppliers [--limit], buyers [--limit] GET /api/v1/{sectors|suppliers|buyers}
lists ls|create|show|add|rm|rename|delete /api/v1/lists*
saved-searches ls|save|show|rename|delete /api/v1/saved-searches*
export [filters] [-o file] GET /api/v1/awards.csv
price GET /api/v1/price (no auth)
pay [--token --customer] POST /api/v1/pay

--format table|json|csv (default table; --json = --format json). Run selltostate <command> --help for the flags of one command.

Exit codes

0 success · 1 error · 2 unauthorized (401) · 3 payment required (402) · 4 rate limited (429) · 64 usage error

Development

This package lives in the data-atlas monorepo next to packages/cli. Keep both in lockstep.

python -m unittest discover -s tests   # no network; compares --help with packages/cli/dist when it is built
uv build                               # dist/selltostate_cli-<version>-py3-none-any.whl

Metadata

Release files for selltostate-cli 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for selltostate-cli 0.2.0
File Size Uploaded Provenance Actions
selltostate_cli-0.2.0.tar.gz 16.6 kB Without provenance Details for selltostate_cli-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for selltostate-cli 0.2.0
File Interpreter ABI Platform Actions
selltostate_cli-0.2.0-py3-none-any.whl Python 3 none any Details for selltostate_cli-0.2.0-py3-none-any.whl

Total release size: 30.6 kB

Release files / selltostate_cli-0.2.0.tar.gz

Download URL selltostate_cli-0.2.0.tar.gz
Size 16.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b0e249b3cb92b6f3812b360b4822cc8cc4aba8818619a0dbf76f65e7ed1c0a11
BLAKE2b-256 checksum
How to use checksums
5487a35e885af69d4c8339d563e4bbc932962e2f5473794dddc3ad9cd6de60c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / selltostate_cli-0.2.0-py3-none-any.whl

Download URL selltostate_cli-0.2.0-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0a902befb275b5ed3c6516c4f2effae473644bf54e204d4899ee202b113860e
BLAKE2b-256 checksum
How to use checksums
9274f2e4e571bf87ddaf98a41fdf222fae8afe1f9aa3814c334c0e273955826f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for selltostate-cli 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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page