Skip to main content

client

The Client module contains the main classes used to interact with the Arraylake service. For asyncio interaction, use the AsyncClient. For regular, non-async interaction, use the Client.

Example usage:

from arraylake import Client
client = Client()
repo = client.get_repo("my-org/my-repo")

AsyncClient

Asyncio Client for interacting with ArrayLake

Arguments:

  • service_uri str - [Optional] The service URI to target.
  • token str - [Optional] API token for service account authentication.

list_repos

async def list_repos(org: str) -> Sequence[RepoModel]

List all repositories for the specified org

Arguments:

  • org - Name of the org

get_repo

async def get_repo(name: str, *, checkout: bool = True) -> AsyncRepo

Get a repo by name

Arguments:

  • name - Full name of the repo (of the form [ORG]/[REPO])
  • checkout - Automatically checkout the repo after instantiation.

get_or_create_repo

async def get_or_create_repo(name: str,
bucket_nickname: Optional[str] = None,
*,
checkout: bool = True) -> AsyncRepo

Get a repo by name. Create the repo if it doesn't already exist.

Arguments:

  • name - Full name of the repo (of the form [ORG]/[REPO])
  • bucket_nickname - the created repo will use this bucket for its chunks. If the repo exists, bucket_nickname is ignored.
  • checkout - Automatically checkout the repo after instantiation. If the repo does not exist, checkout is ignored.

create_repo

async def create_repo(name: str,
bucket_nickname: Optional[str] = None) -> AsyncRepo

Create a new repo

Arguments:

  • name - Full name of the repo to create (of the form [ORG]/[REPO])
  • bucket_nickname - An optional bucket to use for the chunkstore

delete_repo

async def delete_repo(name: str,
*,
imsure: bool = False,
imreallysure: bool = False) -> None

Delete a repo

Arguments:

  • name - Full name of the repo to delete (of the form [ORG]/[REPO])

Client

Client for interacting with ArrayLake.

Arguments:

  • service_uri str - [Optional] The service URI to target.
  • token str - [Optional] API token for service account authentication.

list_repos

def list_repos(org: str) -> Sequence[RepoModel]

List all repositories for the specified org

Arguments:

  • org - Name of the org

get_repo

def get_repo(name: str, *, checkout: bool = True) -> Repo

Get a repo by name

Arguments:

  • name - Full name of the repo (of the form [ORG]/[REPO])
  • checkout - Automatically checkout the repo after instantiation.

get_or_create_repo

def get_or_create_repo(name: str,
bucket_nickname: Optional[str] = None,
*,
checkout: bool = True) -> Repo

Get a repo by name. Create the repo if it doesn't already exist.

Arguments:

  • name - Full name of the repo (of the form [ORG]/[REPO])
  • bucket_nickname - the created repo will use this bucket for its chunks. If the repo exists, bucket_nickname is ignored.
  • checkout - Automatically checkout the repo after instantiation. If the repo does not exist, checkout is ignored.

create_repo

def create_repo(name: str, bucket_nickname: Optional[str] = None) -> Repo

Create a new repo

Arguments:

  • name - Full name of the repo to create (of the form [ORG]/[REPO])
  • bucket_nickname - An optional bucket to use for the chunkstore

delete_repo

def delete_repo(name: str,
*,
imsure: bool = False,
imreallysure: bool = False) -> None

Delete a repo

Arguments:

  • name - Full name of the repo to delete (of the form [ORG]/[REPO])