infinitecompute 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.
Files changed (88) hide show
  1. infinitecompute-0.1.0/.github/workflows/release.yml +34 -0
  2. infinitecompute-0.1.0/.github/workflows/test.yml +18 -0
  3. infinitecompute-0.1.0/.gitignore +6 -0
  4. infinitecompute-0.1.0/LICENSE +21 -0
  5. infinitecompute-0.1.0/Makefile +13 -0
  6. infinitecompute-0.1.0/PKG-INFO +54 -0
  7. infinitecompute-0.1.0/README.md +36 -0
  8. infinitecompute-0.1.0/gen.yml +2 -0
  9. infinitecompute-0.1.0/openapi-v1.json +3001 -0
  10. infinitecompute-0.1.0/pyproject.toml +39 -0
  11. infinitecompute-0.1.0/src/infinitecompute/__init__.py +3 -0
  12. infinitecompute-0.1.0/src/infinitecompute/_api/__init__.py +8 -0
  13. infinitecompute-0.1.0/src/infinitecompute/_api/api/__init__.py +1 -0
  14. infinitecompute-0.1.0/src/infinitecompute/_api/api/audit/__init__.py +1 -0
  15. infinitecompute-0.1.0/src/infinitecompute/_api/api/audit/list_audit_events_audit_events_get.py +272 -0
  16. infinitecompute-0.1.0/src/infinitecompute/_api/api/catalog/__init__.py +1 -0
  17. infinitecompute-0.1.0/src/infinitecompute/_api/api/catalog/list_images_images_get.py +187 -0
  18. infinitecompute-0.1.0/src/infinitecompute/_api/api/catalog/list_server_types_server_types_get.py +187 -0
  19. infinitecompute-0.1.0/src/infinitecompute/_api/api/health/__init__.py +1 -0
  20. infinitecompute-0.1.0/src/infinitecompute/_api/api/health/health_health_get.py +135 -0
  21. infinitecompute-0.1.0/src/infinitecompute/_api/api/keys/__init__.py +1 -0
  22. infinitecompute-0.1.0/src/infinitecompute/_api/api/keys/me_me_get.py +133 -0
  23. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/__init__.py +1 -0
  24. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/close_ssh_servers_server_id_ssh_delete.py +162 -0
  25. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/create_server_servers_post.py +182 -0
  26. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/create_ssh_key_ssh_keys_post.py +167 -0
  27. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/delete_server_servers_server_id_delete.py +162 -0
  28. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/delete_ssh_key_ssh_keys_name_delete.py +158 -0
  29. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/get_server_servers_server_id_get.py +162 -0
  30. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/get_ssh_servers_server_id_ssh_get.py +162 -0
  31. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/list_servers_servers_get.py +187 -0
  32. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/list_ssh_keys_ssh_keys_get.py +187 -0
  33. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/open_ssh_servers_server_id_ssh_put.py +162 -0
  34. infinitecompute-0.1.0/src/infinitecompute/_api/api/servers/server_action_servers_server_id_actions_post.py +183 -0
  35. infinitecompute-0.1.0/src/infinitecompute/_api/api/usage/__init__.py +1 -0
  36. infinitecompute-0.1.0/src/infinitecompute/_api/api/usage/get_usage_usage_get.py +172 -0
  37. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/__init__.py +1 -0
  38. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/attach_volume_volumes_volume_id_attach_post.py +183 -0
  39. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/create_volume_volumes_post.py +182 -0
  40. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/delete_volume_volumes_volume_id_delete.py +162 -0
  41. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/detach_volume_volumes_volume_id_detach_post.py +162 -0
  42. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/get_volume_volumes_volume_id_get.py +162 -0
  43. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/list_backups_volumes_volume_id_backups_get.py +203 -0
  44. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/list_volumes_volumes_get.py +187 -0
  45. infinitecompute-0.1.0/src/infinitecompute/_api/api/volumes/restore_backup_backups_backup_id_restore_post.py +199 -0
  46. infinitecompute-0.1.0/src/infinitecompute/_api/client.py +272 -0
  47. infinitecompute-0.1.0/src/infinitecompute/_api/errors.py +16 -0
  48. infinitecompute-0.1.0/src/infinitecompute/_api/models/__init__.py +79 -0
  49. infinitecompute-0.1.0/src/infinitecompute/_api/models/audit_actor.py +113 -0
  50. infinitecompute-0.1.0/src/infinitecompute/_api/models/audit_event.py +212 -0
  51. infinitecompute-0.1.0/src/infinitecompute/_api/models/audit_event_page.py +97 -0
  52. infinitecompute-0.1.0/src/infinitecompute/_api/models/audit_resource.py +113 -0
  53. infinitecompute-0.1.0/src/infinitecompute/_api/models/backup.py +165 -0
  54. infinitecompute-0.1.0/src/infinitecompute/_api/models/backup_list.py +97 -0
  55. infinitecompute-0.1.0/src/infinitecompute/_api/models/backup_restore.py +54 -0
  56. infinitecompute-0.1.0/src/infinitecompute/_api/models/error_detail.py +77 -0
  57. infinitecompute-0.1.0/src/infinitecompute/_api/models/error_response.py +67 -0
  58. infinitecompute-0.1.0/src/infinitecompute/_api/models/health.py +69 -0
  59. infinitecompute-0.1.0/src/infinitecompute/_api/models/image.py +216 -0
  60. infinitecompute-0.1.0/src/infinitecompute/_api/models/image_list.py +97 -0
  61. infinitecompute-0.1.0/src/infinitecompute/_api/models/me.py +85 -0
  62. infinitecompute-0.1.0/src/infinitecompute/_api/models/me_key.py +86 -0
  63. infinitecompute-0.1.0/src/infinitecompute/_api/models/me_user.py +69 -0
  64. infinitecompute-0.1.0/src/infinitecompute/_api/models/price.py +80 -0
  65. infinitecompute-0.1.0/src/infinitecompute/_api/models/server.py +292 -0
  66. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_action.py +54 -0
  67. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_address.py +77 -0
  68. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_create.py +118 -0
  69. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_list.py +97 -0
  70. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_type.py +168 -0
  71. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_type_gpu.py +99 -0
  72. infinitecompute-0.1.0/src/infinitecompute/_api/models/server_type_list.py +97 -0
  73. infinitecompute-0.1.0/src/infinitecompute/_api/models/site.py +69 -0
  74. infinitecompute-0.1.0/src/infinitecompute/_api/models/ssh_access.py +143 -0
  75. infinitecompute-0.1.0/src/infinitecompute/_api/models/ssh_key.py +85 -0
  76. infinitecompute-0.1.0/src/infinitecompute/_api/models/ssh_key_create.py +50 -0
  77. infinitecompute-0.1.0/src/infinitecompute/_api/models/ssh_key_list.py +97 -0
  78. infinitecompute-0.1.0/src/infinitecompute/_api/models/usage.py +152 -0
  79. infinitecompute-0.1.0/src/infinitecompute/_api/models/usage_server.py +143 -0
  80. infinitecompute-0.1.0/src/infinitecompute/_api/models/usage_spend.py +124 -0
  81. infinitecompute-0.1.0/src/infinitecompute/_api/models/usage_spend_line.py +85 -0
  82. infinitecompute-0.1.0/src/infinitecompute/_api/models/volume.py +196 -0
  83. infinitecompute-0.1.0/src/infinitecompute/_api/models/volume_attach.py +42 -0
  84. infinitecompute-0.1.0/src/infinitecompute/_api/models/volume_create.py +58 -0
  85. infinitecompute-0.1.0/src/infinitecompute/_api/models/volume_list.py +97 -0
  86. infinitecompute-0.1.0/src/infinitecompute/_api/types.py +54 -0
  87. infinitecompute-0.1.0/src/infinitecompute/cli.py +625 -0
  88. infinitecompute-0.1.0/tests/test_cli.py +337 -0
@@ -0,0 +1,34 @@
1
+ name: Release
2
+ # Push a tag v0.1.0 (matching pyproject's version): builds and publishes to PyPI
3
+ # with trusted publishing (no token stored). PyPI must list this repo, this
4
+ # workflow and the environment "pypi" as a trusted publisher for "infinitecompute".
5
+ on:
6
+ push:
7
+ tags: ["v*"]
8
+ jobs:
9
+ build:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ with:
15
+ python-version: "3.12"
16
+ - name: Tag matches the package version
17
+ run: test "v$(python -c 'import tomllib;print(tomllib.load(open("pyproject.toml","rb"))["project"]["version"])')" = "$GITHUB_REF_NAME"
18
+ - run: pip install build && python -m build
19
+ - uses: actions/upload-artifact@v4
20
+ with:
21
+ name: dist
22
+ path: dist/
23
+ publish:
24
+ needs: build
25
+ runs-on: ubuntu-latest
26
+ environment: pypi
27
+ permissions:
28
+ id-token: write
29
+ steps:
30
+ - uses: actions/download-artifact@v4
31
+ with:
32
+ name: dist
33
+ path: dist/
34
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,18 @@
1
+ name: Test
2
+ on:
3
+ pull_request:
4
+ push:
5
+ branches: [main]
6
+ permissions:
7
+ contents: read
8
+ jobs:
9
+ test:
10
+ runs-on: ubuntu-latest
11
+ steps:
12
+ - uses: actions/checkout@v4
13
+ - uses: actions/setup-python@v5
14
+ with:
15
+ python-version: "3.12"
16
+ - run: pip install -e ".[dev]"
17
+ - run: ruff check .
18
+ - run: pytest -q
@@ -0,0 +1,6 @@
1
+ __pycache__/
2
+ *.egg-info/
3
+ .venv/
4
+ dist/
5
+ .pytest_cache/
6
+ .ruff_cache/
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Infinite Compute
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,13 @@
1
+ # Regenerate the API client from the contract. First save the latest contract from
2
+ # <api>/api/public/v1/openapi.json as openapi-v1.json. Never edit src/infinitecompute/_api by hand.
3
+ .PHONY: generate test lint
4
+
5
+ generate:
6
+ openapi-python-client generate --path openapi-v1.json --config gen.yml --meta none \
7
+ --output-path src/infinitecompute/_api --overwrite
8
+
9
+ test:
10
+ pytest -q
11
+
12
+ lint:
13
+ ruff check .
@@ -0,0 +1,54 @@
1
+ Metadata-Version: 2.5
2
+ Name: infinitecompute
3
+ Version: 0.1.0
4
+ Summary: ic: the Infinite Compute command line
5
+ License-Expression: MIT
6
+ License-File: LICENSE
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: attrs>=23.1
9
+ Requires-Dist: httpx>=0.27
10
+ Requires-Dist: keyring>=24
11
+ Requires-Dist: python-dateutil>=2.8
12
+ Requires-Dist: typer>=0.12
13
+ Provides-Extra: dev
14
+ Requires-Dist: openapi-python-client==0.29.1; extra == 'dev'
15
+ Requires-Dist: pytest>=8; extra == 'dev'
16
+ Requires-Dist: ruff>=0.6; extra == 'dev'
17
+ Description-Content-Type: text/markdown
18
+
19
+ # ic: the Infinite Compute command line
20
+
21
+
22
+ ```bash
23
+ pipx install infinitecompute
24
+ ic login # paste an API key from the console (Account → API keys)
25
+ ic whoami
26
+ ic server-types
27
+ ic images --gpu h100
28
+ ic ssh-keys add laptop ~/.ssh/id_ed25519.pub
29
+ ic servers create train --type <server type> --image <image> --ssh-key laptop --wait
30
+ ic ssh train # opens SSH access if needed, then runs ssh
31
+ ic servers park train # frees the GPU, keeps the disk
32
+ ic servers resume train --wait
33
+ ic volumes create data --size-gb 100 --site <site id>
34
+ ic volumes attach <volume id> train
35
+ ic usage --month 2026-10
36
+ ic servers delete train
37
+ ```
38
+
39
+ Every command takes `--json`. The key comes from `INFINITECOMPUTE_API_KEY` if set, else the
40
+ OS keyring (`ic login` / `ic logout`). `--api-url` or `INFINITECOMPUTE_API_URL` overrides the
41
+ API address.
42
+
43
+ ## Development
44
+
45
+ The API client in `src/infinitecompute/_api/` is generated from `openapi-v1.json`, the public
46
+ API contract (`/api/public/v1/openapi.json`). Never edit it by
47
+ hand: copy the new contract in and run `make generate`. The commands live in
48
+ `src/infinitecompute/cli.py`.
49
+
50
+ ```bash
51
+ python -m venv .venv && . .venv/bin/activate
52
+ pip install -e '.[dev]'
53
+ make test lint
54
+ ```
@@ -0,0 +1,36 @@
1
+ # ic: the Infinite Compute command line
2
+
3
+
4
+ ```bash
5
+ pipx install infinitecompute
6
+ ic login # paste an API key from the console (Account → API keys)
7
+ ic whoami
8
+ ic server-types
9
+ ic images --gpu h100
10
+ ic ssh-keys add laptop ~/.ssh/id_ed25519.pub
11
+ ic servers create train --type <server type> --image <image> --ssh-key laptop --wait
12
+ ic ssh train # opens SSH access if needed, then runs ssh
13
+ ic servers park train # frees the GPU, keeps the disk
14
+ ic servers resume train --wait
15
+ ic volumes create data --size-gb 100 --site <site id>
16
+ ic volumes attach <volume id> train
17
+ ic usage --month 2026-10
18
+ ic servers delete train
19
+ ```
20
+
21
+ Every command takes `--json`. The key comes from `INFINITECOMPUTE_API_KEY` if set, else the
22
+ OS keyring (`ic login` / `ic logout`). `--api-url` or `INFINITECOMPUTE_API_URL` overrides the
23
+ API address.
24
+
25
+ ## Development
26
+
27
+ The API client in `src/infinitecompute/_api/` is generated from `openapi-v1.json`, the public
28
+ API contract (`/api/public/v1/openapi.json`). Never edit it by
29
+ hand: copy the new contract in and run `make generate`. The commands live in
30
+ `src/infinitecompute/cli.py`.
31
+
32
+ ```bash
33
+ python -m venv .venv && . .venv/bin/activate
34
+ pip install -e '.[dev]'
35
+ make test lint
36
+ ```
@@ -0,0 +1,2 @@
1
+ package_name_override: _api
2
+ project_name_override: infinitecompute-api