Skip to main content

Evaluates mathematical expressions in strings. Also can call WolframAlpha.

Project description

The CalCalc package makes it easy to evaluate mathematical expressions in strings. For example:

from CalCalc import calculate
calculate('mass of the earth in lbs',  return_float=True) * calculate("3+4", return_float=True)
9.219e+25

If calculate cannot evaluate the math expression locally, it will try to evaluate the expression using WolframAlpha.

CalCalc can also be run from the command line. Make sure to use the -s flag.

$ python CalCalc.py -s '3*(100+8^2)'
330

Using the -w flag the user can query WolframAlpha

$ python CalCalc.py -w 'mass of the earth in kg'
5.97e+24

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

CalCalc_jcroth-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: CalCalc_jcroth-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.4 tqdm/4.59.0 importlib-metadata/3.10.0 keyring/22.3.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.8

File hashes

Hashes for CalCalc_jcroth-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c244741e6ae9828785a7ee4d630246c2af7f388c23deff76eca43be7f4ff757
MD5 91717db178714e3da5908b039038fcc6
BLAKE2b-256 d763ac90aa533cea3d6767a2421f1bdd54866d59f45e25c73ce5e0d4a142a14a

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