Skip to main content

A simple calculator package for learning Python packaging

Project description

Simple Calculator

A simple calculator package for learning Python packaging with setuptools and pyproject.toml.

Installation

pip install simple-calculator

Usage

As a Python module

from simple_calculator import Calculator

calc = Calculator()
result = calc.add(5, 3)  # Returns 8
result = calc.multiply(4, 7)  # Returns 28

As a command-line tool

calc add 5 3
calc multiply 4 7
calc sqrt 16

Development

Install development dependencies:

pip install -e ".[dev]"

Run tests:

pytest

Format code:

black src/ tests/

License

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

yc_calculator-0.1.0.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

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

yc_calculator-0.1.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file yc_calculator-0.1.0.tar.gz.

File metadata

  • Download URL: yc_calculator-0.1.0.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for yc_calculator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ccf5f86e8d0a56661ee1de2684feb1308d952fa10109b45b59b6eb53755dc039
MD5 ab319381690cbc4a98fbb009e70905b3
BLAKE2b-256 7543ffe3b1b4731d7a0f8d8827ab478525de632dc237975a29373369e792c5aa

See more details on using hashes here.

File details

Details for the file yc_calculator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yc_calculator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.5

File hashes

Hashes for yc_calculator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3c8f787a787c74db63916c20ed8e07aab6ffe97163529f602810759049973dd
MD5 697f96566a7292b5c04680a243c917c0
BLAKE2b-256 a4803c7b2205afac46f3362da1d80b0bb64642abd7a59d1695760cf8e23cad49

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