relevanceai.api.endpoints.admin

All admin-related tasks.

Module Contents

Classes

AdminClient

Base class for all relevanceai client utilities

class relevanceai.api.endpoints.admin.AdminClient(project, api_key)

Bases: relevanceai.base._Base

Base class for all relevanceai client utilities

request_read_api_key(self, read_username: str)

Creates a read only key for your project. Make sure to save the api key somewhere safe. When doing a search the admin username should still be used.

Parameters

read_username – Read-only project

copy_foreign_dataset(self, dataset_id: str, source_dataset_id: str, source_project: str, source_api_key: str, project: str = None, api_key: str = None)

Copy a dataset from another user’s projects into your project.

Example

>>> client = Client()
>>> client.admin.send_dataset(
    dataset_id="research",
    receiver_project="...",
    receiver_api_key="..."
)
Parameters
  • dataset_id – The dataset to copy

  • source_dataset_id – The original dataset

  • source_project – The original project to copy from

  • source_api_key – The original API key of the project

  • project – The original project

  • api_key – The original API key

send_dataset(self, dataset_id: str, receiver_project: str, receiver_api_key: str)

Send an individual a dataset.

Example

>>> client = Client()
>>> client.admin.send_dataset(
    dataset_id="research",
    receiver_project="...",
    receiver_api_key="..."
)
Parameters
  • dataset_id (str) – The name of the dataset

  • receiver_project (str) – The project name that will receive the dataset

  • receiver_api_key (str) – The project API key that will receive the dataset

_ping(self)