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

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/

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

normative_diversity-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for normative_diversity-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1bda0fc1d269a27900c47a16fc241c1c143692a818afa56c273d7883ddab27c4
MD5 aa06e930438933ae848caed6288a0479
BLAKE2b-256 2571347275c80cd2e1c1682648d41bda438b835d703e954413af6c5ccf53e03e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for normative_diversity-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aa00b4b862a57746ced3bd1343f539ff7e3c762f938a4bcd304ce16f22c8b8c4
MD5 b4a8d5a20c0b0683b57fe0429a98e51e
BLAKE2b-256 f31f716a8816412eec5a16dd8b108e1c0922c9b34285da14c130621090e959e0

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