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

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

hello_python_empty_package-0.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hello_python_empty_package-0.1.2.tar.gz
Algorithm Hash digest
SHA256 042394fb9c8d649873b99141cd5844bf091e51e3b0240a8a77cdbe6544da5c0d
MD5 c454762745fde25fd55376d6396e379e
BLAKE2b-256 65e63f339b86dedd358a3f70f83b8a7389d95df047f2c5220289ae51dd106613

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hello_python_empty_package-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1ac757273bf9d7f66149453a62363938c870bc460dc60a36a7fe042f46d77f90
MD5 033e58432b563ad41b35f479ee5faa1b
BLAKE2b-256 832e8d17c8304ee96152d441aeb57166817bb0eaed417505f5601b51d3ddb370

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