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_client 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) -> AsyncRepo

Get a repo by name

Arguments:

  • name - Full name of the repo (of the form {ORG}/{REPO})

get_or_create_repo

async def get_or_create_repo(name: str) -> 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})

create_repo

async def create_repo(name: str) -> AsyncRepo

Create a new repo

Arguments:

  • name - Full name of the repo to create (of the form {ORG}/{REPO})

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) -> Repo

Get a repo by name

Arguments:

  • name - Full name of the repo (of the form {ORG}/{REPO})

get_or_create_repo

def get_or_create_repo(name: str) -> 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})

create_repo

def create_repo(name: str) -> Repo

Create a new repo

Arguments:

  • name - Full name of the repo to create (of the form {ORG}/{REPO})

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})