Skip to content
Framework

Data

push_data_registry()

Send the project's data catalog to its data registry on Framework Cloud.

The entries go to POST /api/v1/projects/data, first as a dry run whose changes are listed with a warning: new copies of the project, zips, and Update on GitHub use what is pushed. Then asks "Push these changes?". Entries only on Cloud stay there unless remove=True.

Only the definitions move: each entry's name, path, type, delimiter, locked and private flags, description, and Stata names. Data files are never uploaded, and file hashes stay in the project's framework.db.

Usage

push_data_registry(
    project_path: str | Path = '.',
    remove: bool = False,
    force: bool = False,
    confirm: bool | None = None,
    dry_run: bool = False,
) -> dict[str, Any]

Arguments

Name Type Default Description
project_path str | Path '.'

The project's root directory. Default: the current directory.

remove bool False

Remove entries from Cloud's registry that this project does not have.

force bool False

Push even when Cloud's registry changed since the last pull.

confirm bool | None None

True pushes without asking; False cancels. None asks in a console.

dry_run bool False

List the changes and send nothing.

Value

A dict: revision, changes (Cloud's added, changed, removed, and kept), applied, dry_run, and message.

Details

When Cloud's registry changed since this project last pulled it (the revision in .framework/data.lock.json), the push is refused with "Pull first"; force=True replaces Cloud's newer changes. A push resolves the project again from its blueprint's latest version.

Raises

  • CloudError: Without a project token, offline, when the server has no data registry endpoint, or when Cloud's registry changed and force is False.
  • FrameworkError: Without a console and without confirm=True or dry_run=True.

Search guides and reference for R, Python, Stata, the CLI, and Framework Cloud.