-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Client SDK for rapyuta.io v2 APIs
Resolves AB#35882
- Loading branch information
1 parent
8eefdae
commit 9a459ce
Showing
26 changed files
with
4,170 additions
and
156 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: ✅ Quality Checks | ||
on: [ push ] | ||
|
||
jobs: | ||
perform-checks: | ||
name: Perform checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Lint code | ||
uses: astral-sh/ruff-action@v1 | ||
with: | ||
args: "check" | ||
|
||
- name: Setup uv | ||
uses: astral-sh/setup-uv@v4 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
run: uv python install ${{ matrix.python-version }} | ||
|
||
- name: Run unit tests | ||
run: | | ||
uv sync --all-extras --dev | ||
source .venv/bin/activate | ||
uv run pytest tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ wheels/ | |
main_test.py | ||
test_config.json | ||
|
||
ignore/ | ||
ignore/ | ||
.coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,54 @@ | ||
# Rapyuta IO SDK v2 | ||
Rapyuta IO SDK v2 provides a comprehensive set of tools and functionalities to interact with the rapyut.io platform. | ||
<p align="center"> | ||
<picture> | ||
<source media="(prefers-color-scheme: dark)" srcset="./assets/v2sdk-logo-dark.png"> | ||
<img alt="Telemetry Pipeline Logo" src="./assets/v2sdk-logo-light.png"> | ||
</picture> | ||
</p> | ||
|
||
# rapyuta.io SDK v2 | ||
|
||
rapyuta.io SDK v2 provides a comprehensive set of tools and functionalities to interact with the rapyuta.io platform. | ||
|
||
## Installation | ||
|
||
```bash | ||
pip install rapyuta-io-sdk-v2 | ||
``` | ||
|
||
### Quick Start | ||
## Usage | ||
|
||
To use the SDK, you need to configure it with your rapyuta.io credentials. | ||
|
||
### From a Configuration File | ||
|
||
You can create a `Configuration` object from a JSON file. | ||
|
||
```python | ||
from rapyuta_io_sdk_v2 import Configuration, Client | ||
from rapyuta_io_sdk_v2.config import Configuration, Client | ||
|
||
config = Configuration.from_file("/path/to/config.json") | ||
client = Client(config) | ||
``` | ||
|
||
config = Configuration(email="[email protected]", | ||
password="password", | ||
organization_guid="organization_guid", | ||
project_guid="project_guid") | ||
### Using `email` and `password` | ||
|
||
```python | ||
from rapyuta_io_sdk_v2.config import Configuration, Client | ||
|
||
config = Configuration(organization_guid="ORGANIZATION_GUID") | ||
client = Client(config) | ||
client.login() | ||
client.login(email="EMAIL", password="PASSWORD") | ||
``` | ||
|
||
You are now set to invoke various methods on the `client` object. | ||
|
||
# Get current project | ||
project = client.get_project() | ||
For example, this is how you can list projects. | ||
|
||
```python | ||
projects = client.list_projects() | ||
print(projects) | ||
``` | ||
|
||
## Contributing | ||
|
||
We welcome contributions! Please read our [contributing guidelines](CONTRIBUTING.md) to get started. | ||
We welcome contributions. Please read our [contribution guidelines](CONTRIBUTING.md) to get started. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# ruff: noqa | ||
from rapyuta_io_sdk_v2.config import Configuration | ||
from rapyuta_io_sdk_v2.client import Client | ||
from rapyuta_io_sdk_v2.config import Configuration | ||
from rapyuta_io_sdk_v2.utils import walk_pages | ||
|
||
__version__ = "0.0.1" |
Oops, something went wrong.