Catalog PyPI
Back to packageRELEASE DETAILS

1.1.0

PyPI

agnostic-calculator

A number-type-agnostic calculator.

math
Published5 Jun 2018
Direct dependencies0
Transitive dependenciesNot calculated

README

Version 1.1.0 documentation

Agnostic Calculator

Travis PyPI version

A Python3 library that parses strings representing mathematical expressions. The Calculator takes a converter by which means you can specify numerical types other than regular base 10 numbers. There is one converter available: roman.

How to install

Using pip:

pip install agnostic-calculator

Manually:

git clone git@github.com:carawarner/calculator.git
cd calculator/calculator
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

How to run tests

This libary uses pytest, a powerful but lightweight testing tool for Python.

cd calculator
pytest

How to use

WARNING: Don't use agnostic-calculator in production. The calculator library calls Python's eval() on user input. It's not safe.

from calculator.calculator import Calculator
import calculator.converters.roman as converter

calculator = Calculator(converter)
result = calculator.evaluate(expression)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 0

Native requirements
0 direct targetsNot calculated transitive count
No declared dependencies in this collected response

Declarations describe requirements; they are not a resolved dependency graph.

Distribution files

2 collected
agnostic_calculator-1.1.0-py3-none-any.whl

bdist_wheel · 5.24 KB · Python py3

Source file
agnostic-calculator-1.1.0.tar.gz

sdist · 5.4 KB · Python source

Source file

Repository

PENDING
carawarner/calculator

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:18 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ef843b8af1382882425bd127ca7edc83bbd4f65d443ab07dc473883b15c5c327

Other collected versions

View all collected versions →