Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,13 +132,12 @@ Run it:
uv run python example.py
```

### Generating the documentation
### Previewing the documentation

If added a new service, create a documentation template under api/services for that service.

```bash
cd docs
make html
uv run mkdocs serve
```

### Code style
Expand Down
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

52 changes: 52 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Verda Python SDK

Welcome to the documentation for the official Verda (formerly Datacrunch) Python SDK.

The Public API documentation is [available here](https://api.verda.com/v1/docs)

The Python SDK is open-sourced and can be [found here](https://github.com/verda-cloud/sdk-python)

## Basic Examples:

First, get your client credentials - [instructions available here](https://api.verda.com/v1/docs#description/quick-start-guide).

Deploy a new instance:

```python
import os
from verda import VerdaClient

# Get client secret from environment variable
CLIENT_SECRET = os.environ['VERDA_CLIENT_SECRET']
CLIENT_ID = 'Ibk5bdxV64lKAWOqYnvSi' # Replace with your client ID

# Create client
verda = VerdaClient(CLIENT_ID, CLIENT_SECRET)

# Get all SSH keys id's
ssh_keys = verda.ssh_keys.get()
ssh_keys_ids = list(map(lambda ssh_key: ssh_key.id, ssh_keys))

# Create a new instance
instance = verda.instances.create(instance_type='1V100.6V',
image='ubuntu-24.04-cuda-12.8-open-docker',
ssh_key_ids=ssh_keys_ids,
hostname='example',
description='example instance')
```

List all existing instances, ssh keys, startup scripts:

```python
instances = verda.instances.get()
keys = verda.ssh_keys.get()
scripts = verda.startup_scripts.get()
```

List all available instance & image types (information about available
os images and instances to deploy)

```python
instance_types = verda.instance_types.get()
images_types = verda.images.get()
```
10 changes: 10 additions & 0 deletions docs/logo_darkmode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

5 changes: 5 additions & 0 deletions docs/stylesheets/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
:root > * {
--md-primary-fg-color: #335CA0;
/* --md-primary-fg-color--light: #ECB7B7; */
--md-primary-fg-color--dark: #1D4587;
}
10 changes: 10 additions & 0 deletions docs/verda-logo-main.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading