promote_to_atmosphere

promote.promote_to_atmosphere(
    local_entry,
    local_index,
    atmosphere_client,
    *,
    data_store=None,
    name=None,
    description=None,
    tags=None,
    license=None,
)

Promote a local dataset to the atmosphere network.

This function takes a locally-indexed dataset and publishes it to ATProto, making it discoverable on the federated atmosphere network.

Parameters

Name Type Description Default
local_entry LocalDatasetEntry The LocalDatasetEntry to promote. required
local_index LocalIndex Local index containing the schema for this entry. required
atmosphere_client AtmosphereClient Authenticated AtmosphereClient. required
data_store AbstractDataStore | None Optional data store for copying data to new location. If None, the existing data_urls are used as-is. None
name str | None Override name for the atmosphere record. Defaults to local name. None
description str | None Optional description for the dataset. None
tags list[str] | None Optional tags for discovery. None
license str | None Optional license identifier. None

Returns

Name Type Description
str AT URI of the created atmosphere dataset record.

Raises

Name Type Description
KeyError If schema not found in local index.
ValueError If local entry has no data URLs.

Examples

>>> entry = local_index.get_dataset("mnist-train")
>>> uri = promote_to_atmosphere(entry, local_index, client)
>>> print(uri)
at://did:plc:abc123/ac.foundation.dataset.datasetIndex/...