Skip to main content

pijush-calculator

A lightweight, dependency-free Python arithmetic engine for reliable calculator operations and small reusable math utilities.

Current release

v0.1.1 — Python arithmetic engine

The package is independent of the web calculator and exposes a small function-based API.

Features

  • Addition
  • Subtraction
  • Multiplication
  • Division
  • Explicit ZeroDivisionError handling
  • Python 3.9+
  • Zero runtime dependencies
  • Simple, framework-free API

Installation

Install the published package from PyPI:

pip install pijush-calculator

Usage

from pijush_calculator import add, subtract, multiply, divide

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

Division by zero raises ZeroDivisionError:

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

API

add(a, b)

Returns the sum of two values.

subtract(a, b)

Returns the difference between two values.

multiply(a, b)

Returns the product of two values.

divide(a, b)

Returns the quotient and raises ZeroDivisionError when b is zero.

Development

python -m pip install -e .
python -m pytest
python -m build

Publishing

The package is published to PyPI through GitHub Actions using PyPI Trusted Publishing (OIDC). No long-lived PyPI API token is stored in the repository.

The workflow tests the package, builds source and wheel distributions, and publishes them only after the build succeeds. PyPI release versions are immutable, so future releases must use a new version number.

Package information

Property Value
Package pijush-calculator
Version 0.1.1
Registry PyPI
Runtime dependencies None
Supported Python 3.9+
License MIT

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.2.tar.gz (2.0 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.2-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pijush_calculator-0.1.2.tar.gz
  • Upload date:
  • Size: 2.0 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.2.tar.gz
Algorithm Hash digest
SHA256 ac42b2dc99096079baa80576ff59604699a4c49025014bcbf290740052fbdcdf
MD5 18b16aeb8688ac119d9be5ae3f084455
BLAKE2b-256 a9ccf1801f9cfc9de2ad10fc49d12103aca094a316982c4441a46d3789c33981

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pijush_calculator-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 681a60daebf91ccceedcb86bf01d33fdc663405912ca105cd4a62ee37d404d98
MD5 4fdcb3e70669446022624e0d3701d731
BLAKE2b-256 d8faca7906878974ec3491a3bcb43f354deb6a98cd70f59b2111f2247de1e7de

See more details on using hashes here.

Provenance

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