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
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
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
pytest -q
- Submit a pull request
License
This project is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ea7fec8b0f522b3b5af0998a0fc86d99b24dccc391a97d11b83fdbe78ec301a6
|
|
| MD5 |
e89f89521952c13897f98b39a3664fb7
|
|
| BLAKE2b-256 |
b1723d6808a4e7dfd3287e6a1e1c454ff97ead14143ebf675862ec903de8a01b
|
Provenance
The following attestation bundles were made for krag_mathlib-0.1.15.tar.gz:
Publisher:
release.yml on Kenura-R-Gunarathna/mathlib
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krag_mathlib-0.1.15.tar.gz -
Subject digest:
ea7fec8b0f522b3b5af0998a0fc86d99b24dccc391a97d11b83fdbe78ec301a6 - Sigstore transparency entry: 701960948
- Sigstore integration time:
-
Permalink:
Kenura-R-Gunarathna/mathlib@cd9f188fe5411e34d4ea79414d551de51cd6607c -
Branch / Tag:
refs/tags/v0.1.15 - Owner: https://github.com/Kenura-R-Gunarathna
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cd9f188fe5411e34d4ea79414d551de51cd6607c -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5db9c1c4935cb63f134bd807b4a4d35bcde697cb7dd4146eda21890ba3ee5679
|
|
| MD5 |
45b1fd343d42950caca6749be317cf05
|
|
| BLAKE2b-256 |
a4ea257dd851894f91c37df463890f64b002fd1f6b38dffc17a2bd104e3fd2ac
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
krag_mathlib-0.1.15-py3-none-any.whl -
Subject digest:
5db9c1c4935cb63f134bd807b4a4d35bcde697cb7dd4146eda21890ba3ee5679 - Sigstore transparency entry: 701960949
- Sigstore integration time:
-
Permalink:
Kenura-R-Gunarathna/mathlib@cd9f188fe5411e34d4ea79414d551de51cd6607c -
Branch / Tag:
refs/tags/v0.1.15 - Owner: https://github.com/Kenura-R-Gunarathna
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@cd9f188fe5411e34d4ea79414d551de51cd6607c -
Trigger Event:
push
-
Statement type: