Skip to main content

python library for basic calculations.

Project description

basic_calcs

basic_calcs is a python library for basic calculations. It has no dependencies, just the standard library. It can run on almost any OS or python version.

[!WARNING] basic_calcs is still in alpha and has many missing features.

Installation

Install using this command:

pip install basic_calcs

Build from source

To build from source, first fork this repository and clone it. Then, install the developer dependencies:

pip install build setuptools

It is recommended to run this in a virtual environment. After this, run python -m build to build the wheels and tarball. Then, to install it, run pip install .

[!NOTE] While developing, you might need to build it multiple times. For that, instead of pip install ., run pip install -e .. This installs basic_calcs in editable mode, meaning that you don't have to install it every time and it will automatically update when you edit a file.

Usage

Usage is very simple. Currently, there are only a few functions. Their usage is as follows:

from basic_calcs import add, subtract, multiply, divide, power, root

add(10, 5)
# 15

subtract(10, 5)
# 5

multiply(10, 5)
# 50

divide(10, 5)
# 2

power(10, 2)
# 100

root(9, 2)
# 3

Every function also has a verbose parameter which provides a more verbose answer. it defaults to False. Use it as follows:

from basic_calcs import add

add(5, 5, True) # it works the same for the rest of the functions
# 5 + 5 = 10

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

basic_calcs-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

basic_calcs-0.0.1-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file basic_calcs-0.0.1.tar.gz.

File metadata

  • Download URL: basic_calcs-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for basic_calcs-0.0.1.tar.gz
Algorithm Hash digest
SHA256 324d98a98d0f45bcf5ed67f6a0dfdb15346178501a04e0c1bdca3867bb6a827c
MD5 2a3e4fa91b15d9ee2c33b0ab5a10662d
BLAKE2b-256 221b258be647154f3a56403c8a8c2d6666176ba9ca3a43f75643732365fba55f

See more details on using hashes here.

File details

Details for the file basic_calcs-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: basic_calcs-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for basic_calcs-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 520ca9cf21ebdc46e1af78f91defbf2ba7faa050a57938ae320fb6f4d4758d44
MD5 3df7dd0bf0fb4d9f7559f4ebfb918680
BLAKE2b-256 9740c38235b780a57a30b87fd2fbe051f26f398a93ec1f6206c8886b7d88487c

See more details on using hashes here.

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