Skip to content
Back to top
View this page

# twine.commands.register module

Module containing the logic for `twine register`.

twine.commands.register.register(register_settings: Settings, package: str) → None

  Pre-register a package name with a repository before uploading a distribution.

  Pre-registration is not supported on PyPI, so the `register` command is only necessary if you are using a different repository that requires it.

  Parameters:

    - register_settings – The configured options relating to repository registration.

    - package – The path of the distribution to use for package metadata.

  Raises:

    - twine.exceptions.TwineException – The registration failed due to a configuration error.

    - requests.HTTPError – The repository responded with an error.

twine.commands.register.main(args: List[str]) → None

  Execute the `register` command.

  Parameters:

    args – The command-line arguments.