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.3.tar.gz (174.4 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.3-cp310-abi3-win_amd64.whl (2.5 MB view details)

Uploaded CPython 3.10+Windows x86-64

cql2-0.5.3-cp310-abi3-win32.whl (2.3 MB view details)

Uploaded CPython 3.10+Windows x86

cql2-0.5.3-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.3-cp310-abi3-musllinux_1_2_i686.whl (3.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ i686

cql2-0.5.3-cp310-abi3-musllinux_1_2_armv7l.whl (3.4 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARMv7l

cql2-0.5.3-cp310-abi3-musllinux_1_2_aarch64.whl (3.4 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

cql2-0.5.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.3 MB view details)

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

cql2-0.5.3-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (3.2 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ s390x

cql2-0.5.3-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (4.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ppc64le

cql2-0.5.3-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl (3.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ i686

cql2-0.5.3-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (3.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARMv7l

cql2-0.5.3-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.3-cp310-abi3-macosx_11_0_arm64.whl (3.0 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

cql2-0.5.3-cp310-abi3-macosx_10_12_x86_64.whl (3.0 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for cql2-0.5.3.tar.gz
Algorithm Hash digest
SHA256 4a9fb1034e6d7c37ed224598e09787cf393b0e2cccdb3dd55a3ecc1edaa788f2
MD5 e7d1b4623a0e06426c942e41045403e0
BLAKE2b-256 9e26ecc8f1b1338424ecf5c817965593e135b89f1d9f68020167b48f4926bfaa

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cql2-0.5.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0ac024029460ab37d0e373c42b5547b3a0295a0314f22c6d5448b3d01410e69f
MD5 99b136067f41b7a08a644ff9a1f3c6f9
BLAKE2b-256 4b69f48c1297d175b417a342d6e71dbc6191fa08f7a8d28317dfea50b5c24c27

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for cql2-0.5.3-cp310-abi3-win32.whl
Algorithm Hash digest
SHA256 593d56e506bbec99e2dcf5931f384f58ee8c21f373ec2edfbd3fef4efa1ce41c
MD5 6a70ef7758fc05dc20318dc03ff4f178
BLAKE2b-256 38b96b7359d51dbfc34944b02c1a03723a7f2b2c6b845eb08cf5477b0d5cfa08

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 f4398060bd13c87c768ba2b05c9215db6b40ae9e79487e2bbe5804c1381555d6
MD5 18e857ef3cdd40bdea7ba383f65413c8
BLAKE2b-256 915a2d59dd4b2e0aee8ea6711b38e25b51bcadda0f59180b3cf1ff34691ea48a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-musllinux_1_2_i686.whl
Algorithm Hash digest
SHA256 c52ee44a430a603f182557ed689617c7f2564717a2752c2cf7d04c9295dfced7
MD5 38efd1d17c8e4b762a2c844f14f863da
BLAKE2b-256 ab7800a44cf553ccbb862d928f2b370e76ba32cccc418b3ad2ccd63c9a603c59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 382e124a07d66c1044376b2cc681b3dd4a1f9a39199336922c390fec128508fa
MD5 958d206fe4811e49122313ef9d3c82a0
BLAKE2b-256 89dcfbd0f8043764db81f178b21c5c6235f2db3c2e6e09d7b1ecb3d809cddcba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 b6a8cd8a6c67feb98d6a3fc04009532b378f56bded93cbf584c1f2746f8b1a50
MD5 3b6933eba6c9aa31a510d316c6980740
BLAKE2b-256 df5d9ffabe0ef17208c48a1ef2d63b739e943298666d891a9cdbfdc0e17cbd81

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 661096c3638adf309da2e49b221e89b9d6154b20801684042c02a75481fe88ff
MD5 9b10414cb4296666122014a6527f8f0d
BLAKE2b-256 a2032f35e7836c756d2dbeed52b389f84309d6de5a6c3a122b24a0ec8e814acf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm Hash digest
SHA256 a9c6534e5250efe2996148cce51fdc7e80905762d1c3686d94b06207e523ac05
MD5 2c3f3e1e521ee9dcb6eb7d9e78742fdf
BLAKE2b-256 d90981f9db3edbe3ebe811389de4b559f585b5a1e4f131f1d2272033d3732d1d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm Hash digest
SHA256 9da8bd6b081a4c930bea035c666f5e7e3b6b8c71170523de270a813c409d37d0
MD5 8fefa8957f3fc4db4e1898fa82e6f9e6
BLAKE2b-256 decdd2039573720f08808850c120577f14ff894c42500478d938517b094a2c1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 57d193c61d36a27fbf808a2fe94924faff534e1d359828786bcde8447184003a
MD5 a230de109754da77ec7fa547708cfc4e
BLAKE2b-256 e001796787281d43f848c497519608a492e123e707a0e39e79eb57a81fb28010

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm Hash digest
SHA256 03bb7eaceb76b56058c709215f2755506784fc203b3ff4df2e6174e6c62b938e
MD5 f70db296b602452b90611b765caf35e3
BLAKE2b-256 10e5694c2bb91b802386b750cb495e183584abefeb5909b18c4e1b1f03f4cd4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 d4c45c6b19c0866abffd169ec2afb5a07068f5dd8c88e5715f3c768be19ac859
MD5 738c2ea142c31bbb422b1ddec3e409c4
BLAKE2b-256 b6103cff93d057aca29635bbf9a120a27d357740e13463f027f59b8c6ddc7a4c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 734e71803eba78780fb2e16491ec4b7afea1fc989878dc1b9dfe05dd5775fe95
MD5 a1923667c90ad1a979eb4bac6d7aa38f
BLAKE2b-256 8525ac0afa28cf9cb90897e9220f436a1d0e54d7ad70e12abeb0958a2a4dde1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for cql2-0.5.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b80a0fcab016e3289fef5ba7624c2ca608d3868f256a77d331409417e947a44a
MD5 51a01822943b6da5ba90d41df35ccbc7
BLAKE2b-256 5473c7e6270ac1d13105b6840fe1da9b24244136ee91c4c17868790e49339808

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