Skip to content

Load

load

load_package(package, **kwargs)

Load data and metadata from a datapackage into a GitHub repository.

github

get_repo_settings(package)

Extract and validate repository settings from the package custom metadata.

get_installation_token(app_id, private_key, owner, installation_id=None)

Generate a temporary Installation Access Token using GitHub App credentials.

repo_exists(token, owner, repo, **kwargs)

Check if a GitHub repository exists for a given owner.

create_repo(token, owner, repo, level, visibility, **kwargs)

Create a new GitHub repository under a user or organization.

get_remote_descriptor(owner, repo, token)

Retrieve the datapackage.json currently committed to a GitHub repository. Returns None if the repository has no descriptor yet.

get_deletions(token, files, owner, repo, **kwargs)

Compare the previously committed datapackage.json against the current resource paths and return paths that no longer belong to the data package (removed, merged or renamed resources).

commit_remote(token, files, deletions, owner, repo, **kwargs)

Create a single commit with multiple files using the GitHub Git Data API. Paths listed in deletions are removed from the tree.

get_local_descriptor()

Retrieve the datapackage.json currently committed in the local repository. Returns None if there is no previous commit or descriptor.

commit_local(files, deletions=())

Commit and push local repository changes. Paths listed in deletions are removed from the repository.