{"id":27355631,"url":"https://github.com/vast-ai/vast-sdk","last_synced_at":"2025-06-26T18:32:33.609Z","repository":{"id":263075329,"uuid":"889266184","full_name":"vast-ai/vast-sdk","owner":"vast-ai","description":"Vast.ai python sdk","archived":false,"fork":false,"pushed_at":"2025-05-29T19:32:40.000Z","size":201,"stargazers_count":7,"open_issues_count":5,"forks_count":9,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-05T18:51:51.936Z","etag":null,"topics":["api","artificial-intelligence","cloud-gpu","gpu","machine-learning","sdk-python","vastai"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/vastai-sdk/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vast-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-16T00:01:31.000Z","updated_at":"2025-05-29T19:32:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"4fb17fab-5bdf-41aa-ae22-d06d17c5c343","html_url":"https://github.com/vast-ai/vast-sdk","commit_stats":null,"previous_names":["kristopolous/vastai-sdk","vast-ai/vast-sdk"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/vast-ai/vast-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vast-ai%2Fvast-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vast-ai%2Fvast-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vast-ai%2Fvast-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vast-ai%2Fvast-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vast-ai","download_url":"https://codeload.github.com/vast-ai/vast-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vast-ai%2Fvast-sdk/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262122952,"owners_count":23262502,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","artificial-intelligence","cloud-gpu","gpu","machine-learning","sdk-python","vastai"],"created_at":"2025-04-12T22:24:59.661Z","updated_at":"2025-06-26T18:32:33.557Z","avatar_url":"https://github.com/vast-ai.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🪄 Vast.ai Magic Comes To Python!\nIt's everything you love from the [Vast.ai CLI](https://github.com/vast-ai/vast-cli) tool, wrapped neatly in an easy-to-use Python interface!\n\n[![PyPI version](https://badge.fury.io/py/vastai-sdk.svg)](https://badge.fury.io/py/vastai-sdk)\n\n## 📦 What's in the pip?\nWhy, it’s not just an SDK—it’s an entire development philosophy in a single import statement! With just a humble `pip install`, you unlock:\n\n * ⚡ **Lightning-fast integrations**: So easy, it practically writes your code for you.\n * 🛡️ **Error-free operations**: Bugs? Banished. Exceptions? Extinct. Our SDK makes them a thing of the past!\n * 🌍 **Infinite scalability**: Whether you’re running on a potato or the world’s fastest supercomputer, we’ve got you covered!\n\n## 👀 Let's Sneak A Peek!\nUnder the hood we are using what the [CLI tool](https://github.com/vast-ai/vast-cli) uses and so the documentation is the same. The arguments are the same. \n\n🐚 shell: `vastai cast --spell='abracadabra'` \n\n🐍 python: `vastai.cast(spell='abracadabra')`\n\nJust a little something like this and we're ready to roll!\n```python\nimport vastai_sdk\nvastai = vastai_sdk.VastAI()\n```\n\nIn fact, try this right now. I'll wait!\n\n```python\n$ pip install vastai-sdk\n$ python\nPython 3.11.2 (main, Aug 26 2024, 07:20:54) [GCC 12.2.0] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e import vastai_sdk\n\u003e\u003e\u003e v = vastai_sdk.VastAI()\n\u003e\u003e\u003e v.search_offers()\n````\nThis is easy, you got this! \n\n### What about the return values?\nJSONable objects, exactly as `--raw` would send to your pretty terminal. It's really the same.\n\n### Alright, but what about an API key, what's the catch?\nYou can provide it in the class instantiation: `vastai.VastAI(\"My-magnificent-key\")`\n\nOR, if you leave it blank it will look for a key in the same place as the CLI, right there in your friendly `$HOME` directory.\n\nThe `creds_source` @property will tell you where what's being used came from. Example:\n\n```python\n\u003e\u003e\u003e v=vastai_sdk.VastAI(\"Not-My-Real-Key-Don't-Worry!\")\n\u003e\u003e\u003e v.creds_source\n'CODE'\n\u003e\u003e\u003e v.api_key\n\"Not-My-Real-Key-Don't-Worry!\"\n\u003e\u003e\u003e\n```\n\n### Introspection, `__doc__`, `__sig__`?\nYes, yes, and yes. It's all in there. Try this at the handy python prompt\n\n```python\n\u003e\u003e\u003e help(v.create_instance)\n```\nPretty nice, right? Now do this! (No Spoilers!)\n\n```python\n\u003e\u003e\u003e help(v.\u003ctab\u003e\n```\n\nAll the helpers are there so your vscode, emacs, ipython, and neovim sessions will fly as your fingertips tab away.\n\n### Help, support, all that stuff?\nSure. Just head over to GitHub issues.\n\nThanks for using [Vast.ai](https://vast.ai). We 💖 you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvast-ai%2Fvast-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvast-ai%2Fvast-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvast-ai%2Fvast-sdk/lists"}