Skip to content

Repositories

get_repository(project_name, repository_name) async

Get a repository.

Parameters:

Name Type Description Default
project_name str

The name of the project the repository belongs to.

required
repository_name str

The name of the repository.

required

Returns:

Type Description
Repository

The repository.

update_repository(project_name, repository_name, repository) async

Update a repository.

Parameters:

Name Type Description Default
project_name str

The name of the project the repository belongs to.

required
repository_name str

The name of the repository.

required
repository Repository

The new repository values.

required

delete_repository(project_name, repository_name, missing_ok=None) async

Delete a repository.

Parameters:

Name Type Description Default
project_name str

The name of the project the repository belongs to.

required
repository_name str

The name of the repository.

required
missing_ok Optional[bool]

DEPRECATED: If true, Do not raise an error if the repository does not exist.

None

get_repositories(project_name=None, query=None, sort=None, page=1, page_size=10, limit=None, **kwargs) async

Get a list of all repositories, optionally only in a specific project.

Parameters:

Name Type Description Default
project_name Optional[str]

The name of the project to retrieve repositories from. If None, retrieve repositories from all projects.

None
query str

The query string to filter the repositories.

Supported query patterns are:

* exact match(`"k=v"`)
* fuzzy match(`"k=~v"`)
* range(`"k=[min~max]"`)
* list with union releationship(`"k={v1 v2 v3}"`)
* list with intersection relationship(`"k=(v1 v2 v3)"`).

The value of range and list can be:

* string(enclosed by `"` or `'`)
* integer
* time(in format `"2020-04-09 02:36:00"`)

All of these query patterns should be put in the query string and separated by ",". e.g. "k1=v1,k2=~v2,k3=[min~max]"

None
sort str

The sort method. TODO: add boilerplate sort documentation

None
page int

The page of results to return

1
page_size int

The number of results to return per page

10
limit Optional[int]

The maximum number of results to return.

None

Returns:

Type Description
List[Repository]

A list of repositories matching the query.