orvanta 1.698.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- orvanta-1.698.0/PKG-INFO +107 -0
- orvanta-1.698.0/README.md +83 -0
- orvanta-1.698.0/orvanta/__init__.py +2 -0
- orvanta-1.698.0/orvanta/client.py +2988 -0
- orvanta-1.698.0/orvanta/py.typed +1 -0
- orvanta-1.698.0/orvanta/s3_reader.py +86 -0
- orvanta-1.698.0/orvanta/s3_types.py +74 -0
- orvanta-1.698.0/pyproject.toml +53 -0
orvanta-1.698.0/PKG-INFO
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: orvanta
|
|
3
|
+
Version: 1.698.0
|
|
4
|
+
Summary: A client library for accessing Orvanta server wrapping the Orvanta client API
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Author: Ivo Pauly-Koelewijn
|
|
7
|
+
Author-email: ivo@codegarden.nl
|
|
8
|
+
Requires-Python: >=3.7,<4.0
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.7
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Requires-Dist: httpx (>=0.24)
|
|
20
|
+
Project-URL: Documentation, https://orvanta.ai
|
|
21
|
+
Project-URL: Homepage, https://orvanta.ai
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# orvanta
|
|
25
|
+
|
|
26
|
+
The core client for the [Orvanta](https://orvanta.ai) platform.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
### Basic Usage
|
|
32
|
+
|
|
33
|
+
The `orvanta` package has several methods at the top-level for the most frequent operations you will need.
|
|
34
|
+
|
|
35
|
+
The following are some common examples:
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import time
|
|
39
|
+
|
|
40
|
+
import orvanta
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def main():
|
|
44
|
+
# Get the value of a variable
|
|
45
|
+
orvanta.get_variable("u/user/variable_path")
|
|
46
|
+
|
|
47
|
+
# Run a script synchronously and get the result
|
|
48
|
+
orvanta.run_script("f/pathto/script", args={"arg1": "value1"})
|
|
49
|
+
|
|
50
|
+
# Get the value of a resource
|
|
51
|
+
orvanta.get_resource("u/user/resource_path")
|
|
52
|
+
|
|
53
|
+
# Set the script's state
|
|
54
|
+
orvanta.set_state({"ts": time.time()})
|
|
55
|
+
|
|
56
|
+
# Get the script's state
|
|
57
|
+
orvanta.get_state()
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Advanced Usage
|
|
61
|
+
|
|
62
|
+
The `orvanta` package also exposes the `Orvanta` class, which is the core client for the Orvanta platform.
|
|
63
|
+
|
|
64
|
+
```python
|
|
65
|
+
import time
|
|
66
|
+
|
|
67
|
+
from orvanta import Orvanta
|
|
68
|
+
|
|
69
|
+
def main():
|
|
70
|
+
client = Orvanta(
|
|
71
|
+
# token=... <- this is optional. otherwise the client will look for the OV_TOKEN env var
|
|
72
|
+
)
|
|
73
|
+
|
|
74
|
+
# Get the current version of the client
|
|
75
|
+
client.version
|
|
76
|
+
|
|
77
|
+
# Get the current user
|
|
78
|
+
client.user
|
|
79
|
+
|
|
80
|
+
# Convenience get and post methods exist for https://orvanta.cloud/openapi.html#/
|
|
81
|
+
# these are thin wrappers around the httpx library's get and post methods
|
|
82
|
+
# list worker groups
|
|
83
|
+
client.get("/configs/list_worker_groups")
|
|
84
|
+
# create a group
|
|
85
|
+
client.post(
|
|
86
|
+
f"/w/{client.workspace}/groups/create",
|
|
87
|
+
json={
|
|
88
|
+
"name": "my-group",
|
|
89
|
+
"summary": "my group summary",
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
# Get and set the state of the script
|
|
94
|
+
now = time.time()
|
|
95
|
+
client.state = {"ts": now}
|
|
96
|
+
assert client.state == {"ts": now}
|
|
97
|
+
|
|
98
|
+
# Run a job asynchronously
|
|
99
|
+
job_id = client.run_script_async(path="path/to/script")
|
|
100
|
+
# Get its status
|
|
101
|
+
client.get_job_status(job_id)
|
|
102
|
+
# Get its result
|
|
103
|
+
client.get_result(job_id)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# orvanta
|
|
2
|
+
|
|
3
|
+
The core client for the [Orvanta](https://orvanta.ai) platform.
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Usage
|
|
7
|
+
|
|
8
|
+
### Basic Usage
|
|
9
|
+
|
|
10
|
+
The `orvanta` package has several methods at the top-level for the most frequent operations you will need.
|
|
11
|
+
|
|
12
|
+
The following are some common examples:
|
|
13
|
+
|
|
14
|
+
```python
|
|
15
|
+
import time
|
|
16
|
+
|
|
17
|
+
import orvanta
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def main():
|
|
21
|
+
# Get the value of a variable
|
|
22
|
+
orvanta.get_variable("u/user/variable_path")
|
|
23
|
+
|
|
24
|
+
# Run a script synchronously and get the result
|
|
25
|
+
orvanta.run_script("f/pathto/script", args={"arg1": "value1"})
|
|
26
|
+
|
|
27
|
+
# Get the value of a resource
|
|
28
|
+
orvanta.get_resource("u/user/resource_path")
|
|
29
|
+
|
|
30
|
+
# Set the script's state
|
|
31
|
+
orvanta.set_state({"ts": time.time()})
|
|
32
|
+
|
|
33
|
+
# Get the script's state
|
|
34
|
+
orvanta.get_state()
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Advanced Usage
|
|
38
|
+
|
|
39
|
+
The `orvanta` package also exposes the `Orvanta` class, which is the core client for the Orvanta platform.
|
|
40
|
+
|
|
41
|
+
```python
|
|
42
|
+
import time
|
|
43
|
+
|
|
44
|
+
from orvanta import Orvanta
|
|
45
|
+
|
|
46
|
+
def main():
|
|
47
|
+
client = Orvanta(
|
|
48
|
+
# token=... <- this is optional. otherwise the client will look for the OV_TOKEN env var
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
# Get the current version of the client
|
|
52
|
+
client.version
|
|
53
|
+
|
|
54
|
+
# Get the current user
|
|
55
|
+
client.user
|
|
56
|
+
|
|
57
|
+
# Convenience get and post methods exist for https://orvanta.cloud/openapi.html#/
|
|
58
|
+
# these are thin wrappers around the httpx library's get and post methods
|
|
59
|
+
# list worker groups
|
|
60
|
+
client.get("/configs/list_worker_groups")
|
|
61
|
+
# create a group
|
|
62
|
+
client.post(
|
|
63
|
+
f"/w/{client.workspace}/groups/create",
|
|
64
|
+
json={
|
|
65
|
+
"name": "my-group",
|
|
66
|
+
"summary": "my group summary",
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
# Get and set the state of the script
|
|
71
|
+
now = time.time()
|
|
72
|
+
client.state = {"ts": now}
|
|
73
|
+
assert client.state == {"ts": now}
|
|
74
|
+
|
|
75
|
+
# Run a job asynchronously
|
|
76
|
+
job_id = client.run_script_async(path="path/to/script")
|
|
77
|
+
# Get its status
|
|
78
|
+
client.get_job_status(job_id)
|
|
79
|
+
# Get its result
|
|
80
|
+
client.get_result(job_id)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
```
|