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.6.tar.gz (176.6 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.6-cp310-abi3-win_amd64.whl (2.6 MB view details)

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+Windows x86

cql2-0.5.6-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.6-cp310-abi3-musllinux_1_2_i686.whl (3.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

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

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

cql2-0.5.6-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.6-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.6-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.6-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.6-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.6-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.6-cp310-abi3-macosx_11_0_arm64.whl (3.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

cql2-0.5.6-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.6.tar.gz.

File metadata

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

File hashes

Hashes for cql2-0.5.6.tar.gz
Algorithm Hash digest
SHA256 90fd10cf222d15999899dc67b2310814574d7471fef6beb05ed25c2a9820ef09
MD5 dbfad70d4bc5f1a111413dbeb0494bb3
BLAKE2b-256 a34e7fe4e5e8ead84e4adda9af4ea7b20773b47f357d66549d792803bd498b7b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cql2-0.5.6-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.6-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 074672d50812b7c73110e70175d3c575a096540bdd947925f43a4b8a6a5fd10f
MD5 18a4e5fb3e250b5ed187f576a8898b6f
BLAKE2b-256 3c93154e095f3d9af711c62e659dffaf3681464b566ec9cff375d8565e6e512d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cql2-0.5.6-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.6-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 7d9cbb92d372d5f5516f35ab34ea6c62ca3f88f184f7a16968fc373844374443
MD5 9e5b64bebb3396cd845720ed2b4771cc
BLAKE2b-256 e444411b8da44d983e140721327ecf54b48db523f0345cd060135ebbf40e0eff

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d657b1a571c482bbd2c8f124b9f1730ffd433a57ef61caa7855c56af998b4b78
MD5 6417462072216d5bbe56fd6a38c69e8f
BLAKE2b-256 a0eac13b0c3a80e71f51602459510c05592d1a67cb2b780d1d5ed6e6cfe54fe0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 4f0e3e333be08430ef68d1db9731726c9ec5714b53ba989fb639720dff99d24d
MD5 5d06e66eb11490cef126960519f4bdeb
BLAKE2b-256 0e1d99da637a52fcfa46e5f871ea2edc5b93158fadc0c556b9ab4cf565f226ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 526e2e371469e775d3affed20a033e3924dcded8d022ca7e4f28dd73dce77e27
MD5 779c3242eb83d912e7a7e27af6887b7f
BLAKE2b-256 9e4500353b1516a1a8c0326f11d9e442b5d88025523bef6ea5a6a14e2f490fe0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 370baf8fd0a54973531fbdb2cb78f279085d24d94454d199e2397f19d61b4abc
MD5 1fd21365539a0f741efb51f96e49dfba
BLAKE2b-256 ed31a75c7a8c634eb5509a90a8a5ad29936be483bdb11a765c5895eb056066be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6a480bf1261b93c049f251c741c7da33c21821799c85619188764e4a0f0d62b5
MD5 9501cd0efa7d5cb96a948b055b08d2b0
BLAKE2b-256 ae82d05aa9f07babfb73292719770188369b4c456349da6d8a30361b50815dc5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 240392a707d3a76db19b91c1185f56285d71b5aef3655a36a44709f83e2e74d3
MD5 f299ca18c56bd9c28b75bc32c099aa3e
BLAKE2b-256 537f7ac2eda713052f2a207e0981ebd942d4aa4ee508f8c179fc1cecb88a1393

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 662476f269fab592ceb0d9e4876499d72a0e3a132f7a764385dce62ba3d79fe1
MD5 64e737c48b16e32b1a2d4e58090b6c74
BLAKE2b-256 0da21c824016b329171b62b99ae9e7d9f9680a7bcaefca850c69ad063d3c8495

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 d360a9ab787af7110f63982ffe80a2d82b27a52fe7ce40af814b28bf5158c250
MD5 f04f00b4bc24b9f39941de0bd26b8cbc
BLAKE2b-256 ee2611eb534576b02e0844d76b6598ff33a34b1a02e93198e2950f43a21b46bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 914a8eaa6609808d629ccc2a3825609bd72a7f2e4c4e2a8ed69af42943435be6
MD5 3689a2ddd8917f5493f379e441cd1f9b
BLAKE2b-256 c762bf3c2080bcfb09de01d550e4dc792fa590aeb7939d63bdceb0a8ea1eedad

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 362ca54af3794748fb5904aa183bdcdfb077a536dec55c29723bc0f0bfeb97c2
MD5 78a38454d12d7df03e80e3d49a5bb8d2
BLAKE2b-256 1e36687ddea044b238130b88742a8f2657d161f747b1664f58c40bb48413a547

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7c1fc266664a3f68ce9fc94fb63ccb43ca41f031eda5c0aa6f12571b988153a2
MD5 277451b841c20fbbef87c35e12dfd43c
BLAKE2b-256 c2fb33ca4ad5abc13df26339543c3d2833e5cce5006316edea539a45ddd7722c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.6-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 714d597bf307372ba68284c895ec79c32ee81d3d6430ef041b3fb8a89ebcaf29
MD5 0d3dfa414fcc188b95443fc8f04c9136
BLAKE2b-256 563cee4d7b6b5d2f2bae527d23bc8098e2b43279d3b4f382c83ac5b6f4b3c50a

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