Skip to main content

Requirements

python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
python3 -m pip install --upgrade setuptools wheel

Download repository:

git clone https://github.com/johanneskruse/pypi_template.git

Upload:

In pyproject.toml you can set the name of the pacakage

Run the following to upload:

Packaging Python Projects

Generating distribution archives

cd pypi_template
python3 -m build

This command should output a lot of text and once completed should generate two files in the dist directory:

dist/
├── sampleproject-0.0.1-py3-none-any.whl
└── sampleproject-0.0.1.tar.gz

Uploading the distribution archives

twine upload dist/*

Go to https://pypi.org/ to see the package!

Inspiration

setup.py vs setup.cfg in Python

sample git repo project

Packaging Python Projects

TODO:

  • Setup with pyproject.toml file
  • Note that if you want to install packages in editable mode (i.e. by running pip install -e .) you must have a valid setup.py file apart from setup.cfg and pyproject.toml. TRY TO RUN INSTEAD: pip install -e . -f .

Acronym Generator (help generate the name)

https://acronymify.com/

Release files for newssources 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for newssources 0.0.1
File Size Uploaded
newssources-0.0.1.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for newssources 0.0.1
File Interpreter ABI Platform
newssources-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 5.5 kB

Release files / newssources-0.0.1.tar.gz

Download URL newssources-0.0.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1ade0053c857d6724d64b04befb119c9d09916c33b51585c50e9cfe097ec38fb
BLAKE2b-256 checksum
How to use checksums
e136e2d6bd124d0f7f54f697bc004c20f3faa31041463c83ce130bac702d38a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.5

Release files / newssources-0.0.1-py3-none-any.whl

Download URL newssources-0.0.1-py3-none-any.whl
Size 2.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c479657aa1947565ccb1f63fe712c9fd0f966eae30dc2060cc42f1b03a7385e4
BLAKE2b-256 checksum
How to use checksums
f1ad706b30fc333c3c50651f83c90254f7ef1ad5b36d40a4dbb17452f54ec87a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page