Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Commit 9807ed9

Browse files
authored
Add docs for add_items (#36)
1 parent 123b78e commit 9807ed9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

docs/python-sdk.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,29 @@ response = refuel_client.download_dataset(
148148

149149
This is an asynchronous workflow, and when the dataset is available for download, Refuel will send an email to the email address. Make sure the email address belongs to a valid user from your team. Depending on the size of the dataset, this export step can take a few minutes. Once the download link is created and emailed, it will be valid for 24 hours.
150150

151+
### Adding items (rows) to an uploaded dataset
152+
153+
This function lets you append new rows to an existing dataset. Keep in mind that the dataset schema is decided during initial upload and is not updated here.
154+
155+
```python
156+
import refuel
157+
158+
options = {
159+
"api_key": "<YOUR API KEY>",
160+
"project": "<PROJECT NAME>",
161+
}
162+
163+
refuel_client = refuel.init(**options)
164+
165+
new_items_to_add = [
166+
{"column1": "value1", "column2": "value2", ...},
167+
{"column1": "value3", "column2": "value4", ...},
168+
...
169+
]
170+
171+
refuel_client.add_items(dataset='<DATASET NAME>', items=new_items_to_add)
172+
```
173+
151174
### Querying items (rows) in a dataset
152175

153176
In addition to downloading the entire dataset, you can also fetch a list of items (rows) from the dataset as follows:

0 commit comments

Comments
 (0)