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

Commit

Permalink
Add docs for add_items (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
nihit authored Jun 25, 2024
1 parent 123b78e commit 9807ed9
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/python-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,29 @@ response = refuel_client.download_dataset(

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.

### Adding items (rows) to an uploaded dataset

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.

```python
import refuel

options = {
"api_key": "<YOUR API KEY>",
"project": "<PROJECT NAME>",
}

refuel_client = refuel.init(**options)

new_items_to_add = [
{"column1": "value1", "column2": "value2", ...},
{"column1": "value3", "column2": "value4", ...},
...
]

refuel_client.add_items(dataset='<DATASET NAME>', items=new_items_to_add)
```

### Querying items (rows) in a dataset

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

0 comments on commit 9807ed9

Please sign in to comment.