rg.Argilla
¶
To interact with the Argilla server from python you can use the Argilla
class. The Argilla
client is used to create, get, update, and delete all Argilla resources, such as workspaces, users, datasets, and records.
Usage Examples¶
Connecting to an Argilla server¶
To connect to an Argilla server, instantiate the Argilla
class and pass the api_url
of the server and the api_key
to authenticate.
import argilla_sdk as rg
client = rg.Argilla(
api_url="https://argilla.example.com",
api_key="my_token",
)
Accessing Dataset, Workspace, and User objects¶
The Argilla
clients provides access to the Dataset
, Workspace
, and User
objects of the Argilla server.
my_dataset = client.datasets("my_dataset")
my_workspace = client.workspaces("my_workspace")
my_user = client.users("my_user")
These resources can then be interacted with to access their properties and methods. For example, to list all datasets in a workspace:
Class Reference¶
rg.Argilla
¶
Bases: APIClient
Argilla API client. This is the main entry point to interact with the API.
Attributes:
Name | Type | Description |
---|---|---|
workspaces |
Workspaces
|
A collection of workspaces. |
datasets |
Datasets
|
A collection of datasets. |
users |
Users
|
A collection of users. |
me |
User
|
The current user. |