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

Uploaded Python 3

File details

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

File metadata

  • Download URL: krag_mathlib-0.1.17.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.17.tar.gz
Algorithm Hash digest
SHA256 b6dc0b97cd6010fe165b5493626d4a57a6504a0d085b2a4445a391d07a3f781a
MD5 54f3192360fc59ec3e6b3810bd9adcf5
BLAKE2b-256 c4c61d12b001ed3573d1dd7da196013c4bfafc3647cd6c8c82ed4b8881cdc0dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for krag_mathlib-0.1.17.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.17-py3-none-any.whl.

File metadata

  • Download URL: krag_mathlib-0.1.17-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.17-py3-none-any.whl
Algorithm Hash digest
SHA256 c9a489d50f4b36de1e2c5d59fa7c109be8c81ea0a89ad1a627fd51b585376ba3
MD5 f1533a43f205338dcd8c0f80d6e15083
BLAKE2b-256 0e4ef459f925fd87a686dff7e0ff0ff507ae9c15e27790d441e7ce91004a3dee

See more details on using hashes here.

Provenance

The following attestation bundles were made for krag_mathlib-0.1.17-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