Skip to main content

A simple mathematics utilities library

Project description

mathutils

A simple mathematics utilities library.

Installation

From source:

  1. Build the package
  2. Install the wheel

Usage

from mathutils.basic_ops import add, subtract
from mathutils.statistics import mean

print(add(2,3))
print(mean([1,2,3]))

Development

  • Python >=3.9
  • Build using python -m build or /Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m build
  • Install
prefer wheel:
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m pip install -U dist/*.whl --force-reinstall

or less common:
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m pip install -U dist/*.tar.gz --force-reinstall
  • Uninstall: pip uninstall mathutils

  • Clean up rm -rf dist build mathutils.egg-info

Publish to (Test)PyPI with Twine

  1. Build distributions (wheel + sdist):
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m build
  1. Install Twine:
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m pip install -U twine
  1. Authenticate (pick one):
  • Environment vars (recommended):
export TWINE_USERNAME="__token__"
export TWINE_PASSWORD="pypi-<your-api-token>"
  • Or configure ~/.pypirc (optional):
[distutils]
index-servers = pypi

[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-<your-api-token>

[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-<your-testpypi-token>
  1. Upload to TestPyPI first:
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m twine upload --repository testpypi dist/*
  1. Test install from TestPyPI:
python3 -m pip install --index-url https://test.pypi.org/simple/ \
	--extra-index-url https://pypi.org/simple \
	mathutils-yourname
  1. When ready, bump version in pyproject.toml, rebuild, then upload to PyPI:
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m build
/Users/c0y00hq/Documents/Local_code/mathutils/.venv/bin/python -m twine upload dist/*

Notes:

  • PyPI doesn’t allow re-uploading the same version. Update the version each release.
  • Package install name is mathutils-yourname; import name is mathutils.

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

mathutils_chen-0.1.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

mathutils_chen-0.1.0-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file mathutils_chen-0.1.0.tar.gz.

File metadata

  • Download URL: mathutils_chen-0.1.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for mathutils_chen-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e8ac58e5bde9112a7ca073eae9b29abfe3a1481b7a0e2762be9cc407ea62bf9
MD5 cb36bbc15e17332cb42616c4834b9e05
BLAKE2b-256 858dc9bda7609801edf9711462cd5d3faa54580ecf611b756d760bcca1ee3e5c

See more details on using hashes here.

File details

Details for the file mathutils_chen-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mathutils_chen-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for mathutils_chen-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67ffd3bf7bfc0b6f7146e82457427c7704e425c722ffc4746618f7b19f12b46e
MD5 8e8036d8b0c9adf0cd9169dad48ba6a8
BLAKE2b-256 73dba9d36d08c991ce672be12795b5ff624e75bc6dfba08af5b51d007c4174ab

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