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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pijush_calculator-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 52617dfea9a4e0fca01b089fe85233b2ed13f33fac0a832e2e6f3e5a9a861ab9
MD5 ad4dbd6c02914ef742dc5d69d5a30d9c
BLAKE2b-256 aac9b74e8b6ce8809cdb3a97d9de266ae7c67dc1d752f198d96b9d84ec4ba871

See more details on using hashes here.

Provenance

The following attestation bundles were made for pijush_calculator-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pijush_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4f25456095dd7f134c6f258dd2c7bd9798b75107545b215f6f220c3ddce239a
MD5 85d11c9a26148cba3611fc86f7183ebb
BLAKE2b-256 64a41e03901ab61747d2dc4a543ea41eaeef147e1d274bc00d65e614e0a16f1f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pijush_calculator-0.1.0-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