Skip to main content

Squiid Parser Python bindings

Project description

Squiid Parser Python Bindings

codecov

Python bindings for the parser portion of Squiid calculator. The parser is used to convert algebraic/infix notation to postfix notation that the engine can evaluate.

More documentation is coming soon, however the source code is strongly typed and well-documented.

Simple Demo:

import squiid_parser

p = squiid_parser.SquiidParser()
result = p.parse("(3+5*7)")

assert result == ["3", "5", "7", "*", "+"]

# squiid currently doesn't support symbols, but rather commands
# iterate through the list and convert symbols to commands
for index, value in enumerate(result):
    if value == "*":
        result[index] = "multiply"
    elif value == "+":
        result[index] = "add"
    elif value == "-":
        result[index] = "subtract"
    elif value == "/":
        result[index] = "divide"
    elif value == "^":
        result[index] = "power"
    elif value == "%":
        result[index] = "mod"

assert result == ["3", "5", "7", "multiply", "add"]

# and now pass this array to the engine...

This demo can also be found in this directory

Also see squiid-engine for evaluating RPN expressions.

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

squiid_parser-0.4.0.tar.gz (25.7 kB view details)

Uploaded Source

Built Distributions

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

squiid_parser-0.4.0-cp313-cp313-win_amd64.whl (105.9 kB view details)

Uploaded CPython 3.13Windows x86-64

squiid_parser-0.4.0-cp313-cp313-win32.whl (105.9 kB view details)

Uploaded CPython 3.13Windows x86

squiid_parser-0.4.0-cp313-cp313-musllinux_1_2_x86_64.whl (272.5 kB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

squiid_parser-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

squiid_parser-0.4.0-cp313-cp313-macosx_11_0_arm64.whl (183.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

squiid_parser-0.4.0-cp312-cp312-win_amd64.whl (105.9 kB view details)

Uploaded CPython 3.12Windows x86-64

squiid_parser-0.4.0-cp312-cp312-win32.whl (105.9 kB view details)

Uploaded CPython 3.12Windows x86

squiid_parser-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl (272.5 kB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

squiid_parser-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

squiid_parser-0.4.0-cp312-cp312-macosx_11_0_arm64.whl (183.8 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

squiid_parser-0.4.0-cp311-cp311-win_amd64.whl (105.9 kB view details)

Uploaded CPython 3.11Windows x86-64

squiid_parser-0.4.0-cp311-cp311-win32.whl (105.9 kB view details)

Uploaded CPython 3.11Windows x86

squiid_parser-0.4.0-cp311-cp311-musllinux_1_2_x86_64.whl (272.5 kB view details)

Uploaded CPython 3.11musllinux: musl 1.2+ x86-64

squiid_parser-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.4 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

squiid_parser-0.4.0-cp311-cp311-macosx_11_0_arm64.whl (183.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

squiid_parser-0.4.0-cp310-cp310-win_amd64.whl (105.9 kB view details)

Uploaded CPython 3.10Windows x86-64

squiid_parser-0.4.0-cp310-cp310-win32.whl (105.9 kB view details)

Uploaded CPython 3.10Windows x86

squiid_parser-0.4.0-cp310-cp310-musllinux_1_2_x86_64.whl (272.5 kB view details)

Uploaded CPython 3.10musllinux: musl 1.2+ x86-64

squiid_parser-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (210.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

squiid_parser-0.4.0-cp310-cp310-macosx_11_0_arm64.whl (183.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file squiid_parser-0.4.0.tar.gz.

File metadata

  • Download URL: squiid_parser-0.4.0.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for squiid_parser-0.4.0.tar.gz
Algorithm Hash digest
SHA256 99266c2afcbf752baeb1c9955e1d9c6a8c997d069513a9f462727deca72eb421
MD5 17991d516322694df2d839b9fac7fdd8
BLAKE2b-256 98d475d6b46ae4679ef6de2430b2a5c5337d601ac30b6313a9881c199cd4cdb3

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9ad722218bf5b8591726dac86a097560f6dd9e25886349459ea0d3fc226fc79a
MD5 0f36ca8d1516972fb088f39d3b3c2fb5
BLAKE2b-256 35589ec27af22114c4b4b27a0374c40dc587c0cdfa60dc3e19cbab8e72135bc9

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp313-cp313-win32.whl.

File metadata

  • Download URL: squiid_parser-0.4.0-cp313-cp313-win32.whl
  • Upload date:
  • Size: 105.9 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for squiid_parser-0.4.0-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 8016f5f26f530b635befd65973f9958a5fed3da1277ebe5880d478c24bd9039d
MD5 5b8ebb33f54b961632357a8ec464d188
BLAKE2b-256 10932139e002f3793f3ba321258c05b6f7500700e69ed463f26365752b094f15

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e99068cad0a7e00eb4931635b7c6c9ff6d1d6891c25580cb200edb3f03a16ec9
MD5 735b0a91e3a07080fd75a54b1e1ce811
BLAKE2b-256 a0c99063db7c20aeab2d8030e23f9f9d2b5c7250e9d7743c1373ed8880519b79

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bfcb0d33f630111eaead79d20f6daf9e946ec9e282f676cf979669f09e0887ba
MD5 eda81c7be2d913724294aaba0556e16b
BLAKE2b-256 b119be5791c62530e402a5ed6f4250e6eb3aeb382fd6b8f5ceee2abc0962b7fb

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c7a00537839f997f55f59755671ec8982aafa5776fce11266236a22ba3ee4c92
MD5 e59b982b7c46fe55d243456ac412b009
BLAKE2b-256 d69df438cf9dace9d0e5ab92aa9de6002088f8d7a1bebad80fa0623fd7a35652

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9a965e94b794b4d48cbcc4cea3f44433aeb074135346b3e3ce92c5a81028a43e
MD5 f3280e0d8a9e909b4cf0f594abf67471
BLAKE2b-256 90bb545053f92ade66392c1dacf8a7ea2e34d194c910da41b5dab01753b83708

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp312-cp312-win32.whl.

File metadata

  • Download URL: squiid_parser-0.4.0-cp312-cp312-win32.whl
  • Upload date:
  • Size: 105.9 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for squiid_parser-0.4.0-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 faad6c2cce4bc2bae71a1b94a30d8789e33d208875c87393aaf47fc7159f9f28
MD5 8237bce38332ac61c49d40bfdf403395
BLAKE2b-256 b2b7ec5ce15aeac9f58ec557ae119e06270e2e8a5a6aef4689626ae820202156

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 ada40bb4bbabd35effa352fbb46458f5d77e7e19cdc121b31be1370feb2c2823
MD5 95277c9f576337140b90c2a703bf1ea3
BLAKE2b-256 6cdd9ee51322926a650c8a8308b3aa7665cdd9c0b9a9031f58f7ebbec75ef7a7

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6501c222493dde1ef40f885b2c7d1d384e8328337862bb69ca9fc3729f1d96aa
MD5 1b9e8ab02e0c743bb6be964c5427aaf5
BLAKE2b-256 127e2845ac9bc300936d2eab6bd0a58fe3e6eb74e1a7e9aad7307e50a00122bb

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cffd3628598788030707f2a23c561d1d90a6726241b1102063b439045361599c
MD5 f41a1817b330f541b6cb8a6302e273f6
BLAKE2b-256 41ac96bb5c37522d28149c9d3a11038adddf23b5d47c23590e393874236de78f

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 d787f5be1c61e35bab8c9d4a97fb6065565682c852a6ba18b2cd793799ffb558
MD5 565d74a42a4924c31db599f3178d50d9
BLAKE2b-256 fcf38b364011f29a3c159b5ab112925dd68914c5abc90c9b550bac066a1e9d7d

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp311-cp311-win32.whl.

File metadata

  • Download URL: squiid_parser-0.4.0-cp311-cp311-win32.whl
  • Upload date:
  • Size: 105.9 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for squiid_parser-0.4.0-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 a6909e6a69e7b01cd09ac19063f73f8a66c8d08172db86a5f58c3e8676a668d5
MD5 6a7d177b5dd2a152a339dc31e579e0c3
BLAKE2b-256 4fce8ba99831c4eb51434b51200bebf55abe30cd96977114f36589e798545986

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp311-cp311-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp311-cp311-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 59d8684b2a3da6d96394c029e583fbd20e20e7cbc3e81c37682da11d78c75ee0
MD5 dc522bea92dea2f010931215891453cf
BLAKE2b-256 ecf8ece15782a51e2078f46790f5076becf954ce902bce86c3d5a3a9c300465e

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b23efb4abe2e274cac5f1cdba6175cf494fc6089111d0aad9e4ce5273dfa3066
MD5 5e9c7ffcefdcc2c9bd562a31511bddd0
BLAKE2b-256 3499702c7893a10cc1b2fd8564462a6ad058138ab2cb741eef2e11932d8b3b24

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b27ecc32fc14a656e5eafa55d83cb4e1a390d187caab0836c7e43a645d99b2a
MD5 5fcd99b7581e64a3c4e29f4101161448
BLAKE2b-256 230c52ada3c029b61d1ec781dfc162cd89f895793263880f9a7aeee1b3eea67e

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 887ff5649de7840f5cf23f7d48a2847d3b5fb7d1bc1649b9a9344245681cd58f
MD5 4fd453cf1dd59c6c8d32f8f315774c83
BLAKE2b-256 d0aca283d546633444b4e802d72eae921d1f5c399224af04e4f0cfc141e564a6

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp310-cp310-win32.whl.

File metadata

  • Download URL: squiid_parser-0.4.0-cp310-cp310-win32.whl
  • Upload date:
  • Size: 105.9 kB
  • Tags: CPython 3.10, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for squiid_parser-0.4.0-cp310-cp310-win32.whl
Algorithm Hash digest
SHA256 47a184e51f28a8810de55ed5770b180abc3ee4a219ba12754b033ff94e710c17
MD5 e10d6bbd564cf54588b2f8f3a5a4f857
BLAKE2b-256 02e27697b91dfd67beac093a11d3909b1abbd0b5efc03828eb19f23ef6c062cf

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp310-cp310-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp310-cp310-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 20c2b45e7013afcc95573753987b1ea08860003f380db15259d69bef005001fb
MD5 59e94510c783fa2ae5f6a2e4d7ab5f67
BLAKE2b-256 8668052aa2df1a817ac87278afb1766f4558debc33c1f5cb15d906199314cd2f

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 643a758fee37d956008e1d4c1ee618965f0b3d08fca4f4ac5ed4b543ae5b6e84
MD5 0f3e79d77026dcd04619bbdd0831ca4d
BLAKE2b-256 817e2a937ecc99a13fd600fdd22472ad9c3df3698fed7a181005b50df583e281

See more details on using hashes here.

File details

Details for the file squiid_parser-0.4.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for squiid_parser-0.4.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8f533414c6028d533f4033beb123fd47855c9e80e9dc13c0c52903a789da9b56
MD5 e2e8fcfec2027a62b5dda1de3c2becc1
BLAKE2b-256 d7d9409a12ffc54927f20a00fb8ba365425bb5f6fa3c72fe015cc0df761f9938

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