Skip to main content

Evaluate infix math expresion in python with ease.

Project description

InfixParser

InfixParser is a Python binding for MathParser (https://github.com/KJ002/MathParser/). This module allows for a simple and quick evaluation of strings. It allows you to evaluate a string with security, you define the external variables!

Examples

Basic Eval

result: float = InfixParser.evaluate("1+1") # returns 2.0

Basic Eval (With Evaluator Class)

evaluator = InfixParser.Evaluator()

result: float = evaluator.eval("1+1") # returns 2.0

External Variable Eval

evaluator = InfixParser.Evaluator()

x: int = 20

evaluator.append_variable("x", x)

result: float = evaluator.eval("1+x") # returns 21.0

Updating External Variable Eval

evaluator = InfixParser.Evaluator()

x: int = 20

evaluator.append_variable("x", x)

result1: float = evaluator.eval("1+x") # returns 21.0

x: int = 10

evaluator.append_variable("x", x)

result2: float = evaluator.eval("1+x") # returns 11.0

Functions Eval

"""
It is important to note that function do not have to
have to be called with in an instantiated class
and can just be called with InfixParser.evaluate()
"""

evaluator = InfixParser.Evaluator()

result: float = evaluator.eval("sin(1.5707963267948966)") # returns 1.0

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

InfixParser-3.1.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distributions

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

InfixParser-3.1.4-pp37-pypy37_pp73-win_amd64.whl (83.3 kB view details)

Uploaded PyPyWindows x86-64

InfixParser-3.1.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (119.9 kB view details)

Uploaded PyPymanylinux: glibc 2.12+ x86-64

InfixParser-3.1.4-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl (127.0 kB view details)

Uploaded PyPymanylinux: glibc 2.12+ i686

InfixParser-3.1.4-cp39-cp39-win_amd64.whl (83.4 kB view details)

Uploaded CPython 3.9Windows x86-64

InfixParser-3.1.4-cp39-cp39-win32.whl (73.4 kB view details)

Uploaded CPython 3.9Windows x86

InfixParser-3.1.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (127.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ x86-64

InfixParser-3.1.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl (135.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.12+ i686

InfixParser-3.1.4-cp38-cp38-win_amd64.whl (84.3 kB view details)

Uploaded CPython 3.8Windows x86-64

InfixParser-3.1.4-cp38-cp38-win32.whl (73.3 kB view details)

Uploaded CPython 3.8Windows x86

InfixParser-3.1.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (127.3 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ x86-64

InfixParser-3.1.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl (134.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.12+ i686

InfixParser-3.1.4-cp37-cp37m-win_amd64.whl (84.6 kB view details)

Uploaded CPython 3.7mWindows x86-64

InfixParser-3.1.4-cp37-cp37m-win32.whl (74.0 kB view details)

Uploaded CPython 3.7mWindows x86

InfixParser-3.1.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (127.7 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ x86-64

InfixParser-3.1.4-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl (135.8 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.12+ i686

InfixParser-3.1.4-cp36-cp36m-win_amd64.whl (84.6 kB view details)

Uploaded CPython 3.6mWindows x86-64

InfixParser-3.1.4-cp36-cp36m-win32.whl (73.9 kB view details)

Uploaded CPython 3.6mWindows x86

InfixParser-3.1.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (127.7 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ x86-64

InfixParser-3.1.4-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl (135.7 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.12+ i686

File details

Details for the file InfixParser-3.1.4.tar.gz.

File metadata

  • Download URL: InfixParser-3.1.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4.tar.gz
Algorithm Hash digest
SHA256 ac0b3f65af0178d1639d7d1896afe95eb850ab2f7cd378573cfff2d5db0b51b4
MD5 51063be28e6bd2da582e5a29ab6c68d9
BLAKE2b-256 761614368fd66406be1d51855a85c2be8671d455bc9287c100c56e6271fad080

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-pp37-pypy37_pp73-win_amd64.whl.

File metadata

  • Download URL: InfixParser-3.1.4-pp37-pypy37_pp73-win_amd64.whl
  • Upload date:
  • Size: 83.3 kB
  • Tags: PyPy, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-pp37-pypy37_pp73-win_amd64.whl
Algorithm Hash digest
SHA256 c1c7d28eb8884f957664e6b1cacb5f8fed2f031cadc6e7a1255b02a3070c37ce
MD5 22df68e48b8d1b253e3782a05dc2968e
BLAKE2b-256 fa0d4333a90d3a300cc1c4a60cc6c00e2f357d1bf9be71446e19a353d71852b8

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-pp37-pypy37_pp73-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 02dd20997877aaeb4dc207af6e15e80814fd947fa7bcf82c90e7b96b8069c443
MD5 6d6d18019fe2d2b89758fb376f717299
BLAKE2b-256 155f945fa58ba952b286e2353edf3da1a79fc4692ac5d69589cca32480c25b75

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-pp37-pypy37_pp73-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 1a51e7010cc7da74eb0d325de688031cd386b0f044109028c2547b42ac86ea92
MD5 e078443b2314da2695b900a14f5b241e
BLAKE2b-256 7f871af676df448fc51576a915562181f355a62f3eee36f9635d4da7be06f479

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 83.4 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2e67d872f6f715096f4895a887b490b9bb85c9fc2950e295aadc6d70b9751cd2
MD5 7f7b74af1fb3ec3eaa602f839c293f45
BLAKE2b-256 b5ad7d6e177fe6e499e3df606a06afc0bfbed335eb616e95935846ca428c75e8

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp39-cp39-win32.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp39-cp39-win32.whl
  • Upload date:
  • Size: 73.4 kB
  • Tags: CPython 3.9, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp39-cp39-win32.whl
Algorithm Hash digest
SHA256 07a5c94d29d66f50dcf576fdc364eafa12a62d7ebf5c5b24690ed2a791fcca2a
MD5 ff009dfb79266f944ec35b602662d84c
BLAKE2b-256 454f18ce0d987d379380ac01b6492e02beafc47f354d17da650e07fdf45a50fe

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 24bcdba94d9bab970d6330c29aff5d8d67bc32c2ced7a337b11cbebc0ec9939f
MD5 0db5be31bfd928be3762cd732b3ac580
BLAKE2b-256 c3953e344e41c2d7178bb339a23c10d4ad7639c355c3f98f0a786e16dad03102

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp39-cp39-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 81b8c0697a5c28fa339fe55d6e24841eb482555f482ae028ef4a13aa3d1ce010
MD5 c3b1f366c58d58cc2a5e5ea014a0fd99
BLAKE2b-256 f809d8fadbca84d04eef3b9795128099ae207b085616cfbb5a0462856cf60ff5

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 84.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 b69b8e55168df17c9c8408bd481dd8e5e0f6165cb374f979a4c4008b4caa419f
MD5 850ec3b6dc2e880ee764e9ebcbe5e4a3
BLAKE2b-256 4deff3d6de9b2b2e1c15b14411c868506203fc18ff0962647f3faff5311d5d1b

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp38-cp38-win32.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp38-cp38-win32.whl
  • Upload date:
  • Size: 73.3 kB
  • Tags: CPython 3.8, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp38-cp38-win32.whl
Algorithm Hash digest
SHA256 9301bf60425e41596bc6e33fa7d51a090759616e856b67dcc4c2f78048990a79
MD5 d86cbc6ab95fbdd02673d4a156efe50b
BLAKE2b-256 2213f5b42af82048a0bb1939aa7fde03b590d662d27b3680e9cee74927a0f1b7

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 9b2a3a2e2da9b340e285d6566cac923a4edb58f4b4598b0761411be3c1fe75d0
MD5 533757415b83d54e2f8969548ba91c4e
BLAKE2b-256 72a74e04aab7c18be3969930e2f7fdc863f23262dce4a619d00f8885cfc3b825

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp38-cp38-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 ad9a1a84c92e2b266cb69039bf274956526bec70069b60ba0283a8c529a2854e
MD5 78ef4df083269a5a3980ccfd1e7220bb
BLAKE2b-256 16e3874f6ce477ff8cdc0ecaa93eadcce7826cee5820aaa8705e143619558693

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 84.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 534e6d6cad1c83be7c01040f4f6ca6e521190d29098fc39a9e0849b8cec5a050
MD5 0ed28ce28e276063d4792cb26bc1d4e5
BLAKE2b-256 f6a34d9f93f1b1f172d064348ec4863c36bc2ef9260463110f7e32161ff8b31f

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp37-cp37m-win32.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp37-cp37m-win32.whl
  • Upload date:
  • Size: 74.0 kB
  • Tags: CPython 3.7m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp37-cp37m-win32.whl
Algorithm Hash digest
SHA256 f16bf29790db1d74ad847992be063e8c3203c611543da3efe0f69f5b9e3b5dfb
MD5 15c15011cd585f913615bd23160c7b05
BLAKE2b-256 af093da8466aa6ed7cd66f7b96fa8591c57c4fa1146c3c9ee5649e07487ccb97

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 a0d4c4763cbd747c1dd4a2b2628e9ede128dea78c0d9b138b043af0b6dca4581
MD5 78b22131d20ddc7cc734ed6205177e82
BLAKE2b-256 02902269903099773e87f562f10fce1e7a5cff1f3a8bf828a8eaf73a5238eebb

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp37-cp37m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 8c348941fe13c73d111dabfd72d46191ee4998161af11759be1d063400152191
MD5 4a5942da5a2c9006d4d87847d908b2aa
BLAKE2b-256 01fd6d99576a785572681466522a8b38c3acfe81a6f07ca8fbbf10c771fd67bd

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 84.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 4da3a203301f1f0e04b62ab9b436714f9896343d3fc4ae62dc92b981ba9a3238
MD5 3c4d80bf107ab1bff44fd31967b1e5b4
BLAKE2b-256 d6742bbc486068768bbfc539854c67dc7c6a35be1deb03ab395d62b8e324d7c0

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp36-cp36m-win32.whl.

File metadata

  • Download URL: InfixParser-3.1.4-cp36-cp36m-win32.whl
  • Upload date:
  • Size: 73.9 kB
  • Tags: CPython 3.6m, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for InfixParser-3.1.4-cp36-cp36m-win32.whl
Algorithm Hash digest
SHA256 3d44794391c576bd239daf8636af09876c48c4d2cf2c165baa443958faa6c26f
MD5 f102627852c5c7103e2e8c0fbbcab944
BLAKE2b-256 6f78da313f3de10628fbf6c4e74db8bb15f8fb5c85818f58d4b8080dd8d36882

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm Hash digest
SHA256 609e5f6bb9d234d85bcdf9d0ac86b6224bf55a39c6f7796d81b0aae5637c6053
MD5 10ae17468ca49f172f6c9e33d9190794
BLAKE2b-256 c8c6c80c2ad9925bb1cdbff352c8e574c9a198084d6cbf2031b107b4721344cd

See more details on using hashes here.

File details

Details for the file InfixParser-3.1.4-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl.

File metadata

File hashes

Hashes for InfixParser-3.1.4-cp36-cp36m-manylinux_2_12_i686.manylinux2010_i686.whl
Algorithm Hash digest
SHA256 620b2462a639a4f27e4aae0654a43c9d4cd22bad79ead4e4a56249e8551ffd4f
MD5 4d0c38f3513e72ff849543eb6beacf26
BLAKE2b-256 f76bd0e2686b5b90833aa248833029238c4a5423e44cc29de1ac0fdd48708176

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