Skip to main content

Python client for the Vast.ai cloud rent service.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

vastai-client

Build Status Python Version wemake-python-styleguide

Python client for the Vast.ai cloud rent service. This package provides a Python client, that allows to list, create, destroy GPU instances programmaticaly, using Python.

There is an official Vast.ai CLI, however it can only be used through the command line.

Installation

pip install vastai-client

Example

With the package you can list offers and run selected machines:

from vastai_client import VastClient

client = VastClient(api_key=<your_api_key>)
available_machines = client.search_offers(search_query='reliability > 0.98 num_gpus=1 gpu_name=RTX_3090', sort_order='dph-')
print(available_machines)

selected_machine = available_machines[0]
client.create_instance(id=selected_machine.id, image='pytorch/pytorch', ssh=True)

For more details, watch documentation.

License

MIT

Credits

This project was generated with wemake-python-package. Current template version is: 9899cb192f754a566da703614227e6d63227b933. See what is updated since then.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vastai_client-0.1.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vastai_client-0.1.1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file vastai_client-0.1.1.tar.gz.

File metadata

  • Download URL: vastai_client-0.1.1.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for vastai_client-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f042a58d0ad264398440a279248b8ea136f863864934b82ceab1156f62eb2b59
MD5 5c26a6df4ed2b55c9a86ca8fc1cf23b3
BLAKE2b-256 a335b2d4dcab03386b3d9080227930ffe075e0287b728e96129f8fe5eea29fc5

See more details on using hashes here.

File details

Details for the file vastai_client-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: vastai_client-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for vastai_client-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1da805f36c1ea4de46830f4055f269dbbd89ce4fdbfa5fef1d44fdaeb24a18d5
MD5 5e0fd54b3b96b2a2d0d5c0f9e5a828bc
BLAKE2b-256 d410b2c3a989044e2e36304ea7b26213f9a57b2317ef4b472dd2b498f781c509

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page