bork.api

bork.api.aliases()

Returns a list of the aliases defined in pyproject.toml.

bork.api.build()

Build the project.

bork.api.clean()

Removes artifacts generated by bork.api.build().

(Specifically: ./build, ./dist, and any *.egg-info files.)

bork.api.download(package, release_tag, file_pattern, directory)

Saves files from the designated package, to the specified directory.

The format for package is <SOURCE>:<NAME>, where:

  • <SOURCE> is one of: gh/github, pypi, or testpypi.

  • <NAME> is the identifier for the package on the specified source.

E.g., Bork would be gh:duckinator/bork or pypi:bork.

NOTE: pypi-test is a deprecated alias of testpypi, and will be removed in a future version.

Arguments:
package:

Package to download files for, in the format <SOURCE>:<NAME>.

release_tag:

The version or tag to download.

file_pattern:

Any files matching this pattern will be downloaded.

(Wildcards: * matches anything, ? matches any single character.)

directory:

The directory where files are saved. This directory is created, if needed.

bork.api.release(repository_name, dry_run)

Uploads build artifacts to a PyPi instance or GitHub, as configured in pyproject.toml.

Arguments:
repository_name:

The name of the PyPi repository. (You probably want ‘pypi’.)

dry_run:

If True, don’t actually release, just show what a release would do.

bork.api.run(alias)

Run the alias specified by alias, as defined in pyproject.toml.