quilt

quilt3

Quilt API

clear_api_key() {#clear_api_key}

Clear all in-memory API keys and fall back to interactive sessions.

config(*catalog_url, **config_values)

Set or read the QUILT configuration.

To retrieve the current config, call directly, without arguments:

import quilt3
quilt3.config()

To trigger autoconfiguration, call with just the navigator URL:

import quilt3
quilt3.config('https://YOUR-CATALOG-URL.com')

To set config values, call with one or more key=value pairs:

import quilt3
quilt3.config(navigator_url='http://example.com')

Default config values can be found in quilt3.util.CONFIG_TEMPLATE.

Arguments

Returns

QuiltConfig: (an ordered Mapping)

delete_package(name, registry=None, top_hash=None) {#delete_package}

Delete a package. Deletes only the manifest entries and not the underlying files.

Arguments

get_boto3_session(*, fallback: bool = True) -> boto3.session.Session {#get_boto3_session}

Return a Boto3 session with Quilt stack credentials and AWS region. In case of no Quilt credentials found, return a “normal” Boto3 session if fallback is True, otherwise raise a QuiltException.

Note: you need to call quilt3.config("https://your-catalog-homepage/") to have region set on the session, if you previously called it in quilt3 < 6.1.0.

list_package_versions(name, registry=None) {#list_package_versions}

Lists versions of a given package.

Returns an iterable of (latest_or_unix_ts, hash) of package revisions. If the registry is None, default to the local registry.

Arguments

Returns

An iterable of tuples containing the version and hash for the package.

list_packages(registry=None) {#list_packages}

Lists Packages in the registry.

Returns an iterable of all named packages in a registry. If the registry is None, default to the local registry.

Arguments

Returns

An iterable of strings containing the names of the packages

logged_in() {#logged_in}

Return catalog URL if Quilt client is authenticated, None otherwise.

login()

Authenticate to your Quilt stack and assume the role assigned to you by your stack administrator. Not required if you have existing AWS credentials.

Launches a web browser and asks the user for a token.

login_with_api_key(key: str, registry_url=None) {#login_with_api_key}

Authenticate using an API key.

The API key is stored in memory only (no disk persistence) and scoped to the supplied or currently resolved registry. While set, it overrides any interactive session for that registry. Use clear_api_key() to remove all in-memory API keys and revert to interactive sessions.

Arguments

Raises

logout()

Do not use Quilt credentials. Useful if you have existing AWS credentials.

Execute a search against the configured search endpoint.

Arguments

Query Syntax: Query String Query Query DSL

Index schemas and search examples can be found in the Quilt Search documentation.

Returns

search results

quilt3.api_keys

API for managing your own API keys.

APIKey(id: str, name: str, fingerprint: str, created_at: datetime.datetime, expires_at: datetime.datetime, last_used_at: datetime.datetime | None, status: Literal[‘ACTIVE’, ‘EXPIRED’], user_email: str) -> None

An API key for programmatic access.

APIKeyError(result)

Error during API key operation.

list(name: str | None = None, fingerprint: str | None = None, status: Literal[‘ACTIVE’, ‘EXPIRED’] | None = None) -> list[quilt3.api_keys.APIKey]

List your API keys. Optionally filter by name, fingerprint, or status.

Arguments

Returns

List of your API keys matching the filters.

get(id: str) -> quilt3.api_keys.APIKey | None

Get a specific API key by ID.

Arguments

Returns

The API key, or None if not found.

create(name: str, expires_in_days: int = 90) -> tuple[quilt3.api_keys.APIKey, str]

Create a new API key for yourself.

Arguments

Returns

Tuple of (APIKey, secret). The secret is only returned once - save it securely!

Raises

revoke(id: str | None = None, secret: str | None = None) -> None

Revoke an API key. Provide either the key ID or the secret.

Arguments

Raises