Skip to main content

calckit-kabanda

Arithmetic and statistics helpers for Python, plus a calckit-kabanda command line tool.

Install

From GitHub (no PyPI account needed, works immediately):

pip install git+https://github.com/kabanda-jordan/calckit-kabanda.git

From PyPI, once published:

pip install calckit-kabanda

Or from a checkout:

pip install -e .

The distribution is named calckit-kabanda on PyPI, but the import name stays calc_toolkit, so code reads:

from calc_toolkit import add, subtract, multiply, divide, mean, median

Library use

add(1, 2, 3)            # 6
subtract(10, 3, 2)      # 5
multiply(2, 3, 4)       # 24
divide(10, 4)           # 2.5

mean(2, 4, 6)           # 4.0  (same as average)
median(1, 3, 2)         # 2.0
mode(1, 2, 2, 3)        # 2.0

Arithmetic

Function Example Result
add(*values) add(1, 2, 3) 6
subtract(a, *rest) subtract(10, 3) 7
multiply(*values) multiply(2, 3, 4) 24
divide(a, b) divide(10, 4) 2.5
integer_divide(a, b) integer_divide(10, 3) 3
power(base, exp) power(2, 10) 1024
modulus(a, b) modulus(10, 3) 1
absolute(x) absolute(-5) 5
root(x, degree=2) root(27, 3) 3.0
square_root(x) square_root(9) 3.0
logarithm(x, base=e) logarithm(8, 2) 3.0
factorial(n) factorial(5) 120

Statistics

All statistics accept a variable number of values, so both mean([2, 4, 6]) and mean(2, 4, 6) work.

Function Example Result
total(*values) total(1, 2, 3) 6.0
mean(*values) / average mean(2, 4, 6) 4.0
median(*values) median(4, 1, 3, 2) 2.5
mode(*values) mode(1, 2, 2) 2.0
minimum(*values) min(3, 1, 2) 1.0
maximum(*values) max(3, 1, 2) 3.0
value_range(*values) range(3, 1, 2) 2.0
variance(*values, sample=False) variance(2, 4, 6) 2.666…
standard_deviation(*values) stdev(2, 4, 6) 1.632…
geometric_mean(*values) geometric_mean(1, 4) 2.0
harmonic_mean(*values) harmonic_mean(1, 4) 1.6

Errors

Everything raises CalcError (a plain Exception subclass):

  • DivisionByZeroError for divide(1, 0), modulus(1, 0), integer_divide(1, 0)
  • EmptySequenceError for mean() with no values
  • CalcError for bad types (strings, booleans, negatives under a root, and so on)

Booleans are rejected on purpose, so add(True, 1) fails instead of silently treating True as 1.

Command line

calckit-kabanda add 1 2 3
calckit-kabanda divide 10 4
calckit-kabanda mean 2 4 6
calckit-kabanda median 4 1 3 2
calckit-kabanda sqrt 9
calckit-kabanda factorial 5
calckit-kabanda --help

Without installing the script, use the module form:

python -m calc_toolkit add 1 2 3

Exit codes: 0 success, 1 calculation error, 2 bad arguments.

Tests

pytest

Metadata

Release files for calckit-kabanda 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for calckit-kabanda 0.1.0
File Size Uploaded Provenance Actions
calckit_kabanda-0.1.0.tar.gz 8.1 kB With provenance Details for calckit_kabanda-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for calckit-kabanda 0.1.0
File Interpreter ABI Platform Actions
calckit_kabanda-0.1.0-py3-none-any.whl Python 3 none any Details for calckit_kabanda-0.1.0-py3-none-any.whl

Total release size: 16.9 kB

Release files / calckit_kabanda-0.1.0.tar.gz

Download URL calckit_kabanda-0.1.0.tar.gz
Size 8.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cb5194963e403b958289ac6c22afc4d794b4de1bd796828434531becdd2edc5e
BLAKE2b-256 checksum
How to use checksums
db96210d9f20452809c5b86d7fc72c04f6351e21e4e15ececa38e3954254404f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Release files / calckit_kabanda-0.1.0-py3-none-any.whl

Download URL calckit_kabanda-0.1.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
67d0a8c3e71fe22a10a96b1fbce84754abda2b415324b55626074b877695504e
BLAKE2b-256 checksum
How to use checksums
7a48e36b376b7f586db6daa6e1f8be6af11d247bd1f2217d6d8a782e3216dd45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

Security for calckit-kabanda 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for calckit_kabanda-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page