Skip to content
Cheng Guan Teo edited this page Sep 19, 2021 · 5 revisions

Python Packaging

IMPORTANT: pypi and testpypi are separate services. You need to register and verify email on each of them to use their service.

Directory Structure

.
├── LICENSE
├── README.md
├── pyproject.toml
├── setup.cfg
├── src
│    ├── ura_token
│    ├── __init__.py
│    └── example.py
└── tests

Packaging Python Package

Install build:

	python3 -m pip install --upgrade build

Build package:

	python3 -m build

Install twine:

	python3 -m pip install --upgrade twine

Upload package:

	python3 -m twine upload dist/*

Use testpypi for testing:

	python3 -m twine upload --repository testpypi dist/*
Clone this wiki locally