Skip to content

Commit 23984dd

Browse files
committed
Merge branch 'master' into refactor/use-dataclasses
2 parents 4b4ba01 + 196d69c commit 23984dd

18 files changed

+1345
-642
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,5 @@ cython_debug/
144144
# python sphinx docs
145145
_build/
146146
testing.py
147+
148+
.DS_Store

CHANGELOG.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ Changelog
33

44
* Refactor: use dataclasses and google docstring style in instances.py
55

6+
v1.10.0 (2025-04-17)
7+
-------------------
8+
9+
* Updated version for release
10+
11+
v1.9.1 (2025-04-17)
12+
-------------------
13+
14+
* Added inference client to run inference requests and get status and results
15+
* Added support for asynchronous inference
16+
617
v1.9.0 (2025-04-04)
718
-------------------
819

README.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,26 +24,41 @@ DataCrunch's Public API documentation [is available here](https://api.datacrunch
2424

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

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

2930
Linux (bash):
3031

3132
```bash
32-
export DATACRUNCH_CLIENT_SECRET=Z4CZq02rdwdB7ISV0k4Z2gtwAFKiyvr2U1l0KDIeYi
33+
export DATACRUNCH_CLIENT_ID=YOUR_ID_HERE
34+
export DATACRUNCH_CLIENT_SECRET=YOUR_SECRET_HERE
3335
```
3436

37+
- To enable sending inference requests from SDK you must generate an inference key - [Instructions on inference authorization](https://docs.datacrunch.io/inference/authorization)
38+
39+
40+
- Add your inference key to an environment variable
41+
42+
Linux (bash):
43+
44+
```bash
45+
export DATACRUNCH_INFERENCE_KEY=YOUR_API_KEY_HERE
46+
```
47+
3548
Other platforms:
3649
https://en.wikipedia.org/wiki/Environment_variable
3750

51+
52+
3853
- Example for creating a new instance:
3954

4055
```python
4156
import os
4257
from datacrunch import DataCrunchClient
4358

44-
# Get client secret from environment variable
59+
# Get credentials from environment variables
60+
CLIENT_ID = os.environ.get('DATACRUNCH_CLIENT_ID')
4561
CLIENT_SECRET = os.environ['DATACRUNCH_CLIENT_SECRET']
46-
CLIENT_ID = 'Ibk5bdxV64lKAWOqYnvSi'
4762

4863
# Create datcrunch client
4964
datacrunch = DataCrunchClient(CLIENT_ID, CLIENT_SECRET)
@@ -118,7 +133,7 @@ Create this file in the root directory of the project:
118133
from datacrunch.datacrunch import DataCrunchClient
119134

120135
CLIENT_SECRET = 'secret'
121-
CLIENT_ID = 'Ibk5bdxV64lKAWOqYnvSi'
136+
CLIENT_ID = 'your-id'
122137

123138
# Create datcrunch client
124139
datacrunch = DataCrunchClient(CLIENT_ID, CLIENT_SECRET, base_url='http://localhost:3001/v1')
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from .inference_client import InferenceClient, InferenceResponse
2+
3+
__all__ = ['InferenceClient', 'InferenceResponse']

0 commit comments

Comments
 (0)