Skip to main content

pijush-calculator

A lightweight, dependency-free Python calculator engine from the Modern Calculator project.

Version

0.1.0

Features

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Explicit division-by-zero handling
  • Python 3.9+
  • Zero runtime dependencies

Installation

Once published to PyPI:

pip install pijush-calculator

Usage

from pijush_calculator import add, subtract, multiply, divide

print(add(2, 3))
print(subtract(8, 3))
print(multiply(4, 6))
print(divide(20, 5))

Division by zero raises ZeroDivisionError:

divide(10, 0)
# ZeroDivisionError: cannot divide by zero

Development

python -m pytest
python -m build

The CI workflow installs the package in editable mode before running the test suite and publishes the built distributions from python-package/dist/.

Publishing

Publishing is performed automatically through GitHub Actions using PyPI Trusted Publishing (OIDC). No long-lived PyPI API token is stored in the repository.

The workflow runs the test suite and builds the package before attempting publication. Future package releases must use a new version number because PyPI releases are immutable.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pijush_calculator-0.1.1.tar.gz (1.7 kB view details)

Uploaded Source

Built Distribution

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

pijush_calculator-0.1.1-py3-none-any.whl (2.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pijush_calculator-0.1.1.tar.gz
  • Upload date:
  • Size: 1.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pijush_calculator-0.1.1.tar.gz
Algorithm Hash digest
SHA256 857e8bf964fecf725e98de168946e8483cdf3ba75241d99efc327d86c9db822d
MD5 b0878f367c36c2dda398f3feba106c64
BLAKE2b-256 c76e018ae9e7255eebacb647db8132ffe30df82aacfd1898a92e33634e3ebe16

See more details on using hashes here.

Provenance

The following attestation bundles were made for pijush_calculator-0.1.1.tar.gz:

Publisher: publish-python.yml on TEJAS-MK2/Calculator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for pijush_calculator-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ec267459e12d6222a55bf3754e2d9a571527db8de8bf94566a99b46105195c2a
MD5 c73433670cc6528ea5d08aa43ad65e35
BLAKE2b-256 c9c1a07aac6ce554759024bead8ceb1040ee3ff574f033d714e78031b651a7ad

See more details on using hashes here.

Provenance

The following attestation bundles were made for pijush_calculator-0.1.1-py3-none-any.whl:

Publisher: publish-python.yml on TEJAS-MK2/Calculator

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page