Skip to main content

An empty Python project template with an add function.

Project description

Python empty package template

Ready to be published as a library so any project can install it with pip.

Setup

python -m venv .venv

# for Windows Git Bash
source .venv/Scripts/activate
# or Windows PowerShell
.venv\Scripts\Activate.ps1
# or for Linux:
source .venv/bin/activate

# pip install --upgrade pip
pip install -r requirements.txt

Update requirements.txt while developing:

pip list --not-required --format=freeze > requirements.txt

Run Tests

export PYTHONPATH=src/hello_python_empty_package
python -m unittest -v src/hello_python_empty_package/daominahmath_test.py

Build Package

# for the first time if not installed
# pip install build

python -m build
# Output will be in the `dist` directory

Publish Package

Python Package Index (PyPI):

The following command will require your API token, the token can only be view right after you create it, create a new token if needed. I store the token in .pypi_api_token, which is gitignored.

# for the first time if not installed
# pip install twine

twine upload dist/*

# the 2nd time you run the upload command,
# it will return error "File already exists" if
# you have not changed the version in pyproject.toml.

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

hello_python_empty_package-0.1.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.

hello_python_empty_package-0.1.1-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file hello_python_empty_package-0.1.1.tar.gz.

File metadata

File hashes

Hashes for hello_python_empty_package-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b50efddf34d1ae58e1d4b065821174c0e463acc03a6983b135d63369e6a0cea4
MD5 8f61fea64c2e2f9ac2a13c586cdf361e
BLAKE2b-256 3b47eb19b038fcd632ee782a4344202a9938fcac0a3d0a820572a5f0d78c9605

See more details on using hashes here.

File details

Details for the file hello_python_empty_package-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for hello_python_empty_package-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0bf178c83c4f606cb6438246d2a88c29e89d3c34816cf78a350812f1acd345b1
MD5 28b2538f788694e4d4461a7982226fc5
BLAKE2b-256 805e1a2c82fa4102e42c6a94c90199f741a50991dc361f780bf714dd0a16047b

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