Skip to main content

A sample Python project

Project description

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

Stand inside the project, i.e.

cd pypi_template

Next build the package:

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/*

The user name and the password is the following:

[pypi]
  username = __token__
  password = .....

Where you'll need to generate the API Token as password.

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/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

recxpert-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

recxpert-0.0.1-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file recxpert-0.0.1.tar.gz.

File metadata

  • Download URL: recxpert-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for recxpert-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1f9cf36db5b922b467de26328b8cd09f932cb7798c52c313af9088d63e2a731b
MD5 2a04a877944df95bb133d183123fefd0
BLAKE2b-256 9fbfc95be25ea34e1f2e79b8fb5642903e0b7b84ade692d5fcfdb4c814dd0209

See more details on using hashes here.

File details

Details for the file recxpert-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: recxpert-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for recxpert-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2c40dcc75336c544edf9235787cad7e20da54597bc253c030539eccb0890743e
MD5 da092f85358d3b83ccdda965216d2c23
BLAKE2b-256 402fa5f030cdcf381ab4ab52d73e3103d17ef055b0d093419107a868f8742c72

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page