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

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.3.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.3-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for hello_python_empty_package-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6045c22ea474b89e903d8a45808a415ed7557cc4622b5d29f7fbbfc362df980d
MD5 6ef14e22f8004beb81f5d0ae561a2e96
BLAKE2b-256 df66d74cb8b88fee8922a7de6506b79e934000dbe1f43bcf7b01f51dd04dde4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for hello_python_empty_package-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f73e6894ba3a546a8aa104b67dc48d88114ad954649b406050142bdef2308231
MD5 a82da094374f796185b88b407d7e00e5
BLAKE2b-256 ab602d1854f4a1d3f7a029c5632cc8c7dd840f21e1fa6fc94d2a78dfa4be8cbf

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