pypiuploader.commands Module

Commands for pypiupload program.

main() is installed as a console script during package setup.

Examples:

$ pypiupload requirements requirements.txt -i internal
$ pypiupload packages mock==1.2.1 requests==2.0.0 -i internal
$ pypiupload files packages/mock-1.2.1.tar.gz -i internal
$ pypiupload requirements requirements.txt \
  -i http://localhost:8000 -u user -p password -d packages_download_dir
$ pypiupload requirements requirements.txt \
  -i http://localhost:8000 --no-use-wheel
main(argv=None, stdout=None)[source]

Run the Command.

Parameters:
  • argv – A list of arguments to parse, defaults to sys.argv.
  • stdout – Standard output file, defaults to sys.stdout.
class Command(options, stdout=None)[source]

Bases: object

Runs a pypiupload command.

Available commands:

  • requirements
  • packages
  • files

For files command, upload the given source distribution files.

For requirements and packages, first download the packages and then upload them. download_dir option (-d or --download-dir) can specify the directory to which the files will be downloaded. If not given, will create a temporary directory. With no_use_wheel option (--no-use-wheel), will not find and prefer wheel archives.

index option (-i or --index-url) specifies the PyPI host or name from the ~/.pypirc config file. If username (-u or --username) and password (-p or --password) are not given, will try to find them in the rc file.

Parameters:
run()[source]

Run the command.

parse_args(argv)[source]

Parse arguments for the commands.

Return a argparse.Namespace instance.

Parameters:argv – A list of arguments to parse.

Related Topics

This Page