Skip to main content

A clean mathematical utility package.

Project description

krag-mathlib

krag-mathlib is a Python library for performing mathematical operations like addition, subtraction, and more.


📑 Table of Contents

  1. Introduction

  2. Installation

  3. Development Workflow

  4. Publishing

  5. Usage

  6. Contributing

  7. License


Introduction

krag-mathlib provides a clean and simple interface for performing common mathematical operations. It is designed for Python developers who want a lightweight, easy-to-use library for basic calculations.


Installation

Install the package from PyPI:

pip install krag-mathlib

For development with optional dependencies (for testing, etc.):

pip install .[dev]

Development Workflow

1. pytest -q — Run your tests

Run:

pytest -q

Use it to test your package code during:

  • Development
  • Before committing
  • Before releasing/publishing

This ensures your package works correctly in your local environment.


2. pip install -e . — Editable install (development mode)

Run:

pip install -e .

Use editable mode to:

  • Use the package in another project
  • Test imports without reinstalling
  • Develop multiple packages simultaneously

Changes in:

src/krag_mathlib/

are immediately reflected everywhere Python imports krag_mathlib.


3. python -m build — Create release artifacts

Run:

python -m build

This creates:

dist/krag_mathlib-0.1.0-py3-none-any.whl
" +
"dist/krag_mathlib-0.1.0.tar.gz

Use this before:

  • Releasing on GitHub
  • Publishing to PyPI
  • Sharing the library

Publishing

PyPI

twine upload dist/*

GitHub

  • Upload wheel + tar.gz to a release

Usage

Install from PyPI:

pip install krag-mathlib

Then use in your code:

from krag_mathlib import add, subtract

def main():
    a = 10
    b = 5

    sum_result = add(a, b)
    diff_result = subtract(a, b)

    print(f"The sum of {a} and {b} is: {sum_result}")
    print(f"The difference when {b} is subtracted from {a} is: {diff_result}")

if __name__ == "__main__":
    main()

Note: The PyPI package name is krag-mathlib, but the import is krag_mathlib (matching the internal folder name).


Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests:
pytest -q
  1. Submit a pull request

License

This project is licensed under the MIT License.

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

krag_mathlib-0.1.15.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

krag_mathlib-0.1.15-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file krag_mathlib-0.1.15.tar.gz.

File metadata

  • Download URL: krag_mathlib-0.1.15.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for krag_mathlib-0.1.15.tar.gz
Algorithm Hash digest
SHA256 ea7fec8b0f522b3b5af0998a0fc86d99b24dccc391a97d11b83fdbe78ec301a6
MD5 e89f89521952c13897f98b39a3664fb7
BLAKE2b-256 b1723d6808a4e7dfd3287e6a1e1c454ff97ead14143ebf675862ec903de8a01b

See more details on using hashes here.

Provenance

The following attestation bundles were made for krag_mathlib-0.1.15.tar.gz:

Publisher: release.yml on Kenura-R-Gunarathna/mathlib

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

File details

Details for the file krag_mathlib-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: krag_mathlib-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for krag_mathlib-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 5db9c1c4935cb63f134bd807b4a4d35bcde697cb7dd4146eda21890ba3ee5679
MD5 45b1fd343d42950caca6749be317cf05
BLAKE2b-256 a4ea257dd851894f91c37df463890f64b002fd1f6b38dffc17a2bd104e3fd2ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for krag_mathlib-0.1.15-py3-none-any.whl:

Publisher: release.yml on Kenura-R-Gunarathna/mathlib

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 Pingdom Monitoring Sentry Error logging StatusPage Status page