selltostate-cli 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: selltostate-cli
3
+ Version: 0.1.0
4
+ Summary: selltostate: official CLI for the Sell to State government-contracts data API (REST/MCP parity).
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://www.selltostate.com/cli/
7
+ Project-URL: Source, https://github.com/getbeton/selltostate-cli
8
+ Keywords: selltostate,government,tenders,procurement,cli
9
+ Classifier: Environment :: Console
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+
15
+ # `selltostate-cli` — `selltostate`
16
+
17
+ Official command-line client for the **Sell to State** government-contracts data API
18
+ (`app.selltostate.com`). Python port of the npm package
19
+ [`@selltostate/cli`](https://www.npmjs.com/package/@selltostate/cli): the same commands,
20
+ flags, output and exit codes. Standard library only, Python 3.9+.
21
+
22
+ ```bash
23
+ pipx install selltostate-cli # or: pip install selltostate-cli / uv tool install selltostate-cli
24
+ selltostate auth login # prompts for the key, checks it with /whoami, saves it
25
+ selltostate search "IT consulting" --country singapore --year-min 2026 --format json
26
+ ```
27
+
28
+ Get a key at `https://app.selltostate.com/dashboard` (Settings -> API keys).
29
+
30
+ ## Auth and configuration
31
+
32
+ The CLI sends a dashboard API key as the `x-api-key` header. Resolution order:
33
+
34
+ 1. `--api-key` / `--api-url` flags
35
+ 2. `STS_API_KEY` / `STS_API_URL` environment variables
36
+ 3. `~/.config/selltostate/config.json` (written by `auth login`, mode `0600`; honours `XDG_CONFIG_HOME`)
37
+ 4. Default API URL `https://app.selltostate.com`
38
+
39
+ The npm and the Python CLI share this config file.
40
+
41
+ ## Commands
42
+
43
+ | Command | Endpoint |
44
+ | --- | --- |
45
+ | `whoami` | `GET /api/v1/whoami` |
46
+ | `search <q> [filters]` | `GET /api/v1/search` |
47
+ | `awards [filters]` | `GET /api/v1/awards` |
48
+ | `get buyer\|supplier\|tender\|sector <id>` | `GET /api/v1/{buyers\|suppliers\|tenders\|sectors}/<id>` (tender: `award_id`) |
49
+ | `sectors`, `suppliers [--limit]`, `buyers [--limit]` | `GET /api/v1/{sectors\|suppliers\|buyers}` |
50
+ | `lists ls\|create\|show\|add\|rm\|rename\|delete` | `/api/v1/lists*` |
51
+ | `saved-searches ls\|save\|show\|rename\|delete` | `/api/v1/saved-searches*` |
52
+ | `export [filters] [-o file]` | `GET /api/v1/awards.csv` |
53
+ | `price` | `GET /api/v1/price` (no auth) |
54
+ | `pay [--token --customer]` | `POST /api/v1/pay` |
55
+
56
+ `--format table|json|csv` (default `table`; `--json` = `--format json`). Run
57
+ `selltostate <command> --help` for the flags of one command.
58
+
59
+ ## Exit codes
60
+
61
+ `0` success · `1` error · `2` unauthorized (401) · `3` payment required (402) · `4` rate limited (429) · `64` usage error
62
+
63
+ ## Development
64
+
65
+ This package lives in the `data-atlas` monorepo next to `packages/cli`. Keep both in lockstep.
66
+
67
+ ```bash
68
+ python -m unittest discover -s tests # no network; compares --help with packages/cli/dist when it is built
69
+ uv build # dist/selltostate_cli-<version>-py3-none-any.whl
70
+ ```
@@ -0,0 +1,56 @@
1
+ # `selltostate-cli` — `selltostate`
2
+
3
+ Official command-line client for the **Sell to State** government-contracts data API
4
+ (`app.selltostate.com`). Python port of the npm package
5
+ [`@selltostate/cli`](https://www.npmjs.com/package/@selltostate/cli): the same commands,
6
+ flags, output and exit codes. Standard library only, Python 3.9+.
7
+
8
+ ```bash
9
+ pipx install selltostate-cli # or: pip install selltostate-cli / uv tool install selltostate-cli
10
+ selltostate auth login # prompts for the key, checks it with /whoami, saves it
11
+ selltostate search "IT consulting" --country singapore --year-min 2026 --format json
12
+ ```
13
+
14
+ Get a key at `https://app.selltostate.com/dashboard` (Settings -> API keys).
15
+
16
+ ## Auth and configuration
17
+
18
+ The CLI sends a dashboard API key as the `x-api-key` header. Resolution order:
19
+
20
+ 1. `--api-key` / `--api-url` flags
21
+ 2. `STS_API_KEY` / `STS_API_URL` environment variables
22
+ 3. `~/.config/selltostate/config.json` (written by `auth login`, mode `0600`; honours `XDG_CONFIG_HOME`)
23
+ 4. Default API URL `https://app.selltostate.com`
24
+
25
+ The npm and the Python CLI share this config file.
26
+
27
+ ## Commands
28
+
29
+ | Command | Endpoint |
30
+ | --- | --- |
31
+ | `whoami` | `GET /api/v1/whoami` |
32
+ | `search <q> [filters]` | `GET /api/v1/search` |
33
+ | `awards [filters]` | `GET /api/v1/awards` |
34
+ | `get buyer\|supplier\|tender\|sector <id>` | `GET /api/v1/{buyers\|suppliers\|tenders\|sectors}/<id>` (tender: `award_id`) |
35
+ | `sectors`, `suppliers [--limit]`, `buyers [--limit]` | `GET /api/v1/{sectors\|suppliers\|buyers}` |
36
+ | `lists ls\|create\|show\|add\|rm\|rename\|delete` | `/api/v1/lists*` |
37
+ | `saved-searches ls\|save\|show\|rename\|delete` | `/api/v1/saved-searches*` |
38
+ | `export [filters] [-o file]` | `GET /api/v1/awards.csv` |
39
+ | `price` | `GET /api/v1/price` (no auth) |
40
+ | `pay [--token --customer]` | `POST /api/v1/pay` |
41
+
42
+ `--format table|json|csv` (default `table`; `--json` = `--format json`). Run
43
+ `selltostate <command> --help` for the flags of one command.
44
+
45
+ ## Exit codes
46
+
47
+ `0` success · `1` error · `2` unauthorized (401) · `3` payment required (402) · `4` rate limited (429) · `64` usage error
48
+
49
+ ## Development
50
+
51
+ This package lives in the `data-atlas` monorepo next to `packages/cli`. Keep both in lockstep.
52
+
53
+ ```bash
54
+ python -m unittest discover -s tests # no network; compares --help with packages/cli/dist when it is built
55
+ uv build # dist/selltostate_cli-<version>-py3-none-any.whl
56
+ ```
@@ -0,0 +1,28 @@
1
+ [project]
2
+ name = "selltostate-cli"
3
+ version = "0.1.0"
4
+ description = "selltostate: official CLI for the Sell to State government-contracts data API (REST/MCP parity)."
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ requires-python = ">=3.9"
8
+ dependencies = []
9
+ keywords = ["selltostate", "government", "tenders", "procurement", "cli"]
10
+ classifiers = [
11
+ "Environment :: Console",
12
+ "Programming Language :: Python :: 3",
13
+ "Operating System :: OS Independent",
14
+ ]
15
+
16
+ [project.urls]
17
+ Homepage = "https://www.selltostate.com/cli/"
18
+ Source = "https://github.com/getbeton/selltostate-cli"
19
+
20
+ [project.scripts]
21
+ selltostate = "selltostate_cli:main"
22
+
23
+ [build-system]
24
+ requires = ["setuptools>=77"]
25
+ build-backend = "setuptools.build_meta"
26
+
27
+ [tool.setuptools]
28
+ py-modules = ["selltostate_cli"]
@@ -0,0 +1,70 @@
1
+ Metadata-Version: 2.4
2
+ Name: selltostate-cli
3
+ Version: 0.1.0
4
+ Summary: selltostate: official CLI for the Sell to State government-contracts data API (REST/MCP parity).
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://www.selltostate.com/cli/
7
+ Project-URL: Source, https://github.com/getbeton/selltostate-cli
8
+ Keywords: selltostate,government,tenders,procurement,cli
9
+ Classifier: Environment :: Console
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.9
13
+ Description-Content-Type: text/markdown
14
+
15
+ # `selltostate-cli` — `selltostate`
16
+
17
+ Official command-line client for the **Sell to State** government-contracts data API
18
+ (`app.selltostate.com`). Python port of the npm package
19
+ [`@selltostate/cli`](https://www.npmjs.com/package/@selltostate/cli): the same commands,
20
+ flags, output and exit codes. Standard library only, Python 3.9+.
21
+
22
+ ```bash
23
+ pipx install selltostate-cli # or: pip install selltostate-cli / uv tool install selltostate-cli
24
+ selltostate auth login # prompts for the key, checks it with /whoami, saves it
25
+ selltostate search "IT consulting" --country singapore --year-min 2026 --format json
26
+ ```
27
+
28
+ Get a key at `https://app.selltostate.com/dashboard` (Settings -> API keys).
29
+
30
+ ## Auth and configuration
31
+
32
+ The CLI sends a dashboard API key as the `x-api-key` header. Resolution order:
33
+
34
+ 1. `--api-key` / `--api-url` flags
35
+ 2. `STS_API_KEY` / `STS_API_URL` environment variables
36
+ 3. `~/.config/selltostate/config.json` (written by `auth login`, mode `0600`; honours `XDG_CONFIG_HOME`)
37
+ 4. Default API URL `https://app.selltostate.com`
38
+
39
+ The npm and the Python CLI share this config file.
40
+
41
+ ## Commands
42
+
43
+ | Command | Endpoint |
44
+ | --- | --- |
45
+ | `whoami` | `GET /api/v1/whoami` |
46
+ | `search <q> [filters]` | `GET /api/v1/search` |
47
+ | `awards [filters]` | `GET /api/v1/awards` |
48
+ | `get buyer\|supplier\|tender\|sector <id>` | `GET /api/v1/{buyers\|suppliers\|tenders\|sectors}/<id>` (tender: `award_id`) |
49
+ | `sectors`, `suppliers [--limit]`, `buyers [--limit]` | `GET /api/v1/{sectors\|suppliers\|buyers}` |
50
+ | `lists ls\|create\|show\|add\|rm\|rename\|delete` | `/api/v1/lists*` |
51
+ | `saved-searches ls\|save\|show\|rename\|delete` | `/api/v1/saved-searches*` |
52
+ | `export [filters] [-o file]` | `GET /api/v1/awards.csv` |
53
+ | `price` | `GET /api/v1/price` (no auth) |
54
+ | `pay [--token --customer]` | `POST /api/v1/pay` |
55
+
56
+ `--format table|json|csv` (default `table`; `--json` = `--format json`). Run
57
+ `selltostate <command> --help` for the flags of one command.
58
+
59
+ ## Exit codes
60
+
61
+ `0` success · `1` error · `2` unauthorized (401) · `3` payment required (402) · `4` rate limited (429) · `64` usage error
62
+
63
+ ## Development
64
+
65
+ This package lives in the `data-atlas` monorepo next to `packages/cli`. Keep both in lockstep.
66
+
67
+ ```bash
68
+ python -m unittest discover -s tests # no network; compares --help with packages/cli/dist when it is built
69
+ uv build # dist/selltostate_cli-<version>-py3-none-any.whl
70
+ ```
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ selltostate_cli.py
4
+ selltostate_cli.egg-info/PKG-INFO
5
+ selltostate_cli.egg-info/SOURCES.txt
6
+ selltostate_cli.egg-info/dependency_links.txt
7
+ selltostate_cli.egg-info/entry_points.txt
8
+ selltostate_cli.egg-info/top_level.txt
9
+ tests/test_cli.py
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ selltostate = selltostate_cli:main
@@ -0,0 +1 @@
1
+ selltostate_cli