Skip to main content

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. The token usually stored in .pypirc, which is gitignored.

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

twine upload dist/*
# Output is on:
# https://pypi.org/project/hello-python-empty-package

# 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.

Metadata

Release files for hello-python-empty-package 0.1.3

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

Source distribution (sdist)

Source distribution for hello-python-empty-package 0.1.3
File Size Uploaded
hello_python_empty_package-0.1.3.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hello-python-empty-package 0.1.3
File Interpreter ABI Platform
hello_python_empty_package-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 8.0 kB

Release files / hello_python_empty_package-0.1.3.tar.gz

Download URL hello_python_empty_package-0.1.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6045c22ea474b89e903d8a45808a415ed7557cc4622b5d29f7fbbfc362df980d
BLAKE2b-256 checksum
How to use checksums
df66d74cb8b88fee8922a7de6506b79e934000dbe1f43bcf7b01f51dd04dde4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / hello_python_empty_package-0.1.3-py3-none-any.whl

Download URL hello_python_empty_package-0.1.3-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f73e6894ba3a546a8aa104b67dc48d88114ad954649b406050142bdef2308231
BLAKE2b-256 checksum
How to use checksums
ab602d1854f4a1d3f7a029c5632cc8c7dd840f21e1fa6fc94d2a78dfa4be8cbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

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