Skip to main content

Parse, validate, and convert Common Query Language (CQL2) text and JSON

Project description

cql2

Python library and command-line interface (CLI) for parsing and converting Common Query Language (CQL2), with Rust under the hood.

Usage

pip install cql2

Then:

expr = Expr("landsat:scene_id = 'LC82030282019133LGN00'")
# or
expr = cql2.parse_file("fixtures/text/example01.txt")

s = expr.to_text()
d = expr.to_json()
sql = expr.to_sql()
print("SQL query:", sql.query)
print("SQL params:", sql.params)

Or from via the command-line interface:

$ cql2 -o json "landsat:scene_id = 'LC82030282019133LGN00'"
{"op":"=","args":[{"property":"landsat:scene_id"},"LC82030282019133LGN00"]}

Developing

To install the package to your virtual environment and test:

maturin develop --uv -m python/Cargo.toml && pytest python

More information

This package is part of cql2-rs, see that repo for license and contributing information.

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

cql2-0.5.4.tar.gz (176.2 kB view details)

Uploaded Source

Built Distributions

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

cql2-0.5.4-cp310-abi3-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10+Windows x86-64

cql2-0.5.4-cp310-abi3-win32.whl (2.4 MB view details)

Uploaded CPython 3.10+Windows x86

cql2-0.5.4-cp310-abi3-musllinux_1_2_x86_64.whl (3.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

cql2-0.5.4-cp310-abi3-musllinux_1_2_i686.whl (3.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

cql2-0.5.4-cp310-abi3-musllinux_1_2_armv7l.whl (3.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

cql2-0.5.4-cp310-abi3-musllinux_1_2_aarch64.whl (3.5 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

cql2-0.5.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

cql2-0.5.4-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

cql2-0.5.4-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (4.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

cql2-0.5.4-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (3.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ i686

cql2-0.5.4-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (3.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

cql2-0.5.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

cql2-0.5.4-cp310-abi3-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

cql2-0.5.4-cp310-abi3-macosx_10_12_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file cql2-0.5.4.tar.gz.

File metadata

  • Download URL: cql2-0.5.4.tar.gz
  • Upload date:
  • Size: 176.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for cql2-0.5.4.tar.gz
Algorithm Hash digest
SHA256 c0cc41880f20b5c464a80bc9dbd048409a00d3a8d173e2da8e26bd79a7348f5e
MD5 2c0cb346db6d89cf90ee4c3e0a779185
BLAKE2b-256 82287108d36ad05084f8cea098d3b75cc0f5113fda61cd53bfb12a05804e384d

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: cql2-0.5.4-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.6 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for cql2-0.5.4-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 2384526d83f09da34417bc06ff7cb9d4b914a401feaeed651d5af0d46e58ceb4
MD5 c8d564cc33cba7438467d428cd099a0c
BLAKE2b-256 8accf8c6e368b4fec32eed2db0a17ba04a0653953a67af13e0566d1fa84e8d50

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-win32.whl.

File metadata

  • Download URL: cql2-0.5.4-cp310-abi3-win32.whl
  • Upload date:
  • Size: 2.4 MB
  • Tags: CPython 3.10+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for cql2-0.5.4-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 78dcabb1b662948c364c78543fde8e439a7c14d72874b420298ec0fd92fac8ce
MD5 03efe2e46b50c6409b30bdc132164ea2
BLAKE2b-256 ad8b78195fbf93dccd5f986d3f0babcc0480a3f9327a6eac0e6bbbd55d84cf24

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 640635abd215ecaa09f1b4620070b943063b947ce8721d31552b385af1ff9e7d
MD5 74b5981785df45a2f95cb1f58b3470e2
BLAKE2b-256 bfbb3177789068397756aa1b2186ee4bf841558edd03d13eceaeb30cb0d9fe40

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-musllinux_1_2_i686.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 1e183421287cb68f83a79799c0a01bb01dda757d35803934d58bf6eeb2e2327f
MD5 38d823f36a279d546cd5d92c885a18b0
BLAKE2b-256 94ad07e0f59c085cc14c78127326befecadc6793475e7c80a5effbdb3a066ca6

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 91b5ff923b8143825c86c45c8b1a166c694cc8cba1eb25ccc94e1815543d3d48
MD5 cbd199c67ea166eb4ca1fc7c2b10abb5
BLAKE2b-256 c86426babee9280ded12d8e5fc89e1ad79f327c4bc35123ea88a8b68933bb8cc

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 84181fb3f75ee23e2ff68a6c7277c728501c65a28ec0f7aa96fa74bf6c89c1da
MD5 9a7273ae76eb781b0cfc7e27a0f7404e
BLAKE2b-256 e8a63ba846b1b868c5c84de35cb2c8b90bd8b73713a985815b28c3c26f9fe780

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e12931980b997186b07f213489a9c7b464b842a8fdb9f33f080c39159946e5e5
MD5 a45a43b63dd7c51efdace8ccf52894ec
BLAKE2b-256 023580fa65bc4b358031cdf65ea3c5e32245233b26d3eb314634da3f59901217

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 d80dafe75e7375ddc6a1bff64d2e7abccee2a3800103469004dd85282a47a8eb
MD5 b2236af1af8132a5749d994541be34d4
BLAKE2b-256 c2bea4d728747a4ed8f11c4209eceac0e11c50e12a4862003be69e2af728a735

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 fb6c2f91fb8bea6c2d232d3b7470a651469a5ea298b3976b9425467417fc0523
MD5 700a902ebbf960899fe7d46e20bdd440
BLAKE2b-256 50da23c7e038cdda6250c5ced392f5a454acae3315d0ac50a0ed5c251c9c79c7

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 260709025cda2ab508c8d439c9f7009218fb20ba1bd75095220fe47d2560f9a4
MD5 9390f295f35027e0f1aefda936ff7f57
BLAKE2b-256 0c29fc3e42b0c5376a7f9be4f7a79ba4b40a86eeb81ce3c66d42568918e039b3

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 4953a720ce75dd02ceea2dc2694a9fa3f654f5625eb577fc31ed9f7b87936cad
MD5 aebb76e388f6037b1993772698b77e54
BLAKE2b-256 06c75bfd311477bfa24483f703cd21c0a6285c1b5f1eae55cb0ec5c55ce6e6ee

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9f4e2fbfc40217059e5a748f7a01020fae2478651d5c36a3b4d062f9ec889279
MD5 d829c1f332a151d5609ec8ca44c19982
BLAKE2b-256 021ea31851d7b0826a91da4b0feaddc6047b86a82d53118c29fadda1a4d9688c

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f69ca518d8f3858b68e76e02f25c8bf809c4ce654611061adae4f6fa4dc8ebaf
MD5 6c8aff1abede2db2d7433f845cc9857f
BLAKE2b-256 06bab5a528b924423530beea7837ba396bd7c6a4165a870431aa1519dfc4884e

See more details on using hashes here.

File details

Details for the file cql2-0.5.4-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cql2-0.5.4-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 00de65fd1719597201c0118ead21a1f04f44c90acedd30471a7bbafd419777f2
MD5 2406fc02ab45ef2cc02099dd172a500c
BLAKE2b-256 c807aa6d1b42e816fb1a95fdb9233edc196cae4d91a9281a19b8b5b7a80386f6

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