Skip to content
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: "Publish verda to PyPI"

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-24.04

environment:
name: pypi

permissions:
id-token: write
contents: read

steps:
- uses: actions/checkout@v5

- name: Install uv
uses: astral-sh/setup-uv@v7
with:
version: "0.9.11"

- name: Set up Python
run: uv python install

- name: Build
run: uv build

# check that basic features work and we didn't miss to include crucial files
- name: Smoke test (wheel)
run: uv run --isolated --no-project --with dist/*.whl --with "responses==0.25.8" tests/smoke.py

- name: Smoke test (source distribution)
run: uv run --isolated --no-project --with dist/*.tar.gz --with "responses==0.25.8" tests/smoke.py

# we use Trusted publishing, no keys necessary: https://docs.astral.sh/uv/guides/integration/github/#publishing-to-pypi
- name: Publish
run: uv publish
38 changes: 0 additions & 38 deletions .github/workflows/publish_package.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-24.04
strategy:
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- uses: actions/checkout@v5
Expand Down
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,51 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Highlights

- `datacrunch` package is now `verda`, because the company [changed the name to Verda](https://verda.com/blog/datacrunch-is-changing-its-name-to-verda). Original `datacrunch` package does not go anywhere and would continue tracking `verda` releases.

### Deprecated

- `DataCrunchClient` and `datacrunch` are deprecated, please change your imports to `VerdaClient` and `verda`.

Was:

```shell
uv add datacrunch
pip3 install datacrunch
```

```python
from datacrunch import DataCrunchClient

datacrunch = DataCrunchClient(...)
datacrunch.instances.create(...)
```

Now:

```shell
uv add verda
pip3 install verda
```

```python
from verda import VerdaClient

verda = VerdaClient(...)
verda.instances.create(...)
```

### Added

- Added shared filesystem (SFS) type constant and example

### Changed

- Refactor `instance_types.py` to use dataclass
- Put back support for Python 3.10
- Default API base URL is now `https://api.verda.com/v1`

## [1.16.0] - 2025-10-27

Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@

Any contributions are welcome!

Open new issues at https://github.com/DataCrunch-io/datacrunch-python/issues.
Open new issues at https://github.com/verda-cloud/sdk-python/issues.

You can open pull requests by following the steps:

## Code Contribution

Prerequisite: install [`uv`](https://docs.astral.sh/uv/).

1. Fork the `datacrunch-python` repo on GitHub.
1. Fork this repo on GitHub.

2. Clone your fork locally:

```bash
git clone [email protected]:{your_username}/datacrunch-python.git
cd datacrunch-python
git clone [email protected]:{your_username}/sdk-python.git
cd sdk-python
```

3. Set up local environment and install dependencies:
Expand Down Expand Up @@ -80,6 +80,6 @@ To release a new version:
git push --tags
```

4. [Draft and publish](https://github.com/DataCrunch-io/datacrunch-python/releases) a new release.
4. [Draft and publish](https://github.com/verda-cloud/sdk-python/releases) a new release.

5. Check that package is automatically published to [PyPI](https://pypi.org/project/datacrunch/) via [GitHub action](https://github.com/DataCrunch-io/datacrunch-python/actions/workflows/publish_package.yml).
5. Check that package is automatically published to [PyPI](https://pypi.org/project/verda/) via [GitHub action](https://github.com/verda-cloud/sdk-python/actions/workflows/publish_package.yml).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 DataCrunch Oy
Copyright (c) 2025 Verda Cloud Oy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
68 changes: 34 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1,52 @@
# DataCrunch Python SDK
# Verda Python SDK

[<img src='https://github.com/DataCrunch-io/datacrunch-python/workflows/Unit%20Tests/badge.svg'>](https://github.com/DataCrunch-io/datacrunch-python/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster)
[<img src='https://github.com/DataCrunch-io/datacrunch-python/workflows/Code%20Style/badge.svg'>](https://github.com/DataCrunch-io/datacrunch-python/actions?query=workflow%3A%22Code+Style%22+branch%3Amaster)
[<img src="https://codecov.io/gh/DataCrunch-io/datacrunch-python/branch/master/graph/badge.svg?token=5X5KTYSSPK">](https://codecov.io/gh/DataCrunch-io/datacrunch-python)
[<img src='https://github.com/verda-cloud/sdk-python/workflows/Unit%20Tests/badge.svg'>](https://github.com/verda-cloud/sdk-python/actions?query=workflow%3A%22Unit+Tests%22+branch%3Amaster)
[<img src='https://github.com/verda-cloud/sdk-python/workflows/Code%20Style/badge.svg'>](https://github.com/verda-cloud/sdk-python/actions?query=workflow%3A%22Code+Style%22+branch%3Amaster)
[<img src="https://codecov.io/gh/verda-cloud/sdk-python/branch/master/graph/badge.svg?token=5X5KTYSSPK">](https://codecov.io/gh/verda-cloud/sdk-python)
[<img src='https://readthedocs.org/projects/datacrunch-python/badge/?version=latest'>](https://datacrunch-python.readthedocs.io/en/latest/)
[<img src='https://img.shields.io/github/license/DataCrunch-io/datacrunch-python'>](https://github.com/DataCrunch-io/datacrunch-python/blob/master/LICENSE)
[<img src='https://img.shields.io/pypi/v/datacrunch?logo=python'>](https://pypi.org/project/datacrunch/)
[<img src='https://img.shields.io/pypi/pyversions/datacrunch'>](https://pypi.org/project/datacrunch/)
[<img src='https://img.shields.io/github/license/verda-cloud/sdk-python'>](https://github.com/verda-cloud/sdk-python/blob/master/LICENSE)
[<img src='https://img.shields.io/pypi/v/verda?logo=python'>](https://pypi.org/project/verda/)
[<img src='https://img.shields.io/pypi/pyversions/verda'>](https://pypi.org/project/verda/)

The official [DataCrunch.io](https://datacrunch.io) Python SDK.
The official [Verda](https://verda.com) (formerly DataCrunch) Python SDK.

The SDK's documentation is available on [ReadTheDocs](https://datacrunch-python.readthedocs.io/en/latest/)

DataCrunch's Public API documentation [is available here](https://api.datacrunch.io/v1/docs).
Verda Public API documentation [is available here](https://api.verda.com/v1/docs).

## Getting Started - Using the SDK:

- Install:

```bash
# via pip
pip3 install datacrunch
pip3 install verda

# via uv
uv add datacrunch
uv add verda
```

- Generate your client credentials - [instructions in the public API docs](https://api.datacrunch.io/v1/docs#description/quick-start-guide).
- Generate your client credentials - [instructions in the public API docs](https://api.verda.com/v1/docs#description/quick-start-guide).


- Add your client id and client secret to an environment variable (don't want it to be hardcoded):

Linux (bash):

```bash
export DATACRUNCH_CLIENT_ID=YOUR_ID_HERE
export DATACRUNCH_CLIENT_SECRET=YOUR_SECRET_HERE
export VERDA_CLIENT_ID=YOUR_ID_HERE
export VERDA_CLIENT_SECRET=YOUR_SECRET_HERE
```

- To enable sending inference requests from SDK you must generate an inference key - [Instructions on inference authorization](https://docs.datacrunch.io/inference/authorization)
- To enable sending inference requests from SDK you must generate an inference key - [Instructions on inference authorization](https://docs.verda.com/inference/authorization)


- Add your inference key to an environment variable

Linux (bash):

```bash
export DATACRUNCH_INFERENCE_KEY=YOUR_API_KEY_HERE
export VERDA_INFERENCE_KEY=YOUR_API_KEY_HERE
```

Other platforms:
Expand All @@ -58,27 +58,27 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch

```python
import os
from datacrunch import DataCrunchClient
from verda import VerdaClient

# Get credentials from environment variables
CLIENT_ID = os.environ.get('DATACRUNCH_CLIENT_ID')
CLIENT_SECRET = os.environ['DATACRUNCH_CLIENT_SECRET']
CLIENT_ID = os.environ.get('VERDA_CLIENT_ID')
CLIENT_SECRET = os.environ['VERDA_CLIENT_SECRET']

# Create datcrunch client
datacrunch = DataCrunchClient(CLIENT_ID, CLIENT_SECRET)
# Create client
verda = VerdaClient(CLIENT_ID, CLIENT_SECRET)

# Get all SSH keys
ssh_keys = [key.id for key in datacrunch.ssh_keys.get()]
ssh_keys = [key.id for key in verda.ssh_keys.get()]

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

# Delete instance
datacrunch.instances.action(instance.id, datacrunch.constants.instance_actions.DELETE)
verda.instances.action(instance.id, verda.constants.instance_actions.DELETE)
```

More examples can be found in the `/examples` folder or in the [documentation](https://datacrunch-python.readthedocs.io/en/latest/).
Expand All @@ -92,8 +92,8 @@ Prerequisite: install [`uv`](https://docs.astral.sh/uv/).
Clone the repository, create local environment and install dependencies:

```bash
git clone [email protected]:DataCrunch-io/datacrunch-python.git
cd datacrunch-python
git clone [email protected]:verda-cloud/sdk-python.git
cd sdk-python
uv sync
```

Expand All @@ -117,13 +117,13 @@ Create a file in the root directory of the project:

```python
# example.py
from datacrunch.datacrunch import DataCrunchClient
from verda.verda import VerdaClient

CLIENT_SECRET = 'secret'
CLIENT_ID = 'your-id'

# Create datacrunch client
datacrunch = DataCrunchClient(CLIENT_ID, CLIENT_SECRET, base_url='http://localhost:3001/v1')
# Create client
verda = VerdaClient(CLIENT_ID, CLIENT_SECRET, base_url='http://localhost:3001/v1')
```

Run it:
Expand Down Expand Up @@ -153,4 +153,4 @@ uv run ruff format

## Contact

You can [contact us here](https://datacrunch.io/contact), or open an issue in the repo.
You can [contact us here](https://verda.com/contact), or open an issue in the repo.
2 changes: 0 additions & 2 deletions datacrunch/__init__.py

This file was deleted.

10 changes: 5 additions & 5 deletions docs/source/API.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
API Reference
=============

Main DataCrunch Client
----------------------
Main Verda Client
-----------------

.. autoclass:: datacrunch.DataCrunchClient
.. autoclass:: verda.VerdaClient
:members:

API Exception
-------------

.. autoclass:: datacrunch.exceptions.APIException
.. autoclass:: verda.exceptions.APIException
:members:

Constants
---------

.. autoclass:: datacrunch.constants.Constants
.. autoclass:: verda.constants.Constants
:members:

Services API
Expand Down
4 changes: 2 additions & 2 deletions docs/source/api/services/balance.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Balance
=======

.. autoclass:: datacrunch.balance.balance.BalanceService
.. autoclass:: verda.balance.balance.BalanceService
:members:

.. autoclass:: datacrunch.balance.balance.Balance
.. autoclass:: verda.balance.balance.Balance
:members:
4 changes: 2 additions & 2 deletions docs/source/api/services/containers.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Containers
==========

.. autoclass:: datacrunch.containers.containers.ContainersService
.. autoclass:: verda.containers.containers.ContainersService
:members:

.. autoclass:: datacrunch.containers.containers.Container
.. autoclass:: verda.containers.containers.Container
:members:

4 changes: 2 additions & 2 deletions docs/source/api/services/images.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Images
======

.. autoclass:: datacrunch.images.images.ImagesService
.. autoclass:: verda.images.images.ImagesService
:members:

.. autoclass:: datacrunch.images.images.Image
.. autoclass:: verda.images.images.Image
:members:
Loading