Skip to main content

library for constructing cql2-json queries and for generating libraries with multiple STAC extensions"

Project description

PyPI-Server

cqlalchemy

Library to help make CQL2-json queries a little easier!

STAC is a terrific specification for cataloging temporal/spatial data with an emphasis on providing queryable fields for searching that data. One of the ways to make complex queries is to use cql2-json.

This project provides two different functionalities. One is the cqlalchemy.stac.query module which provides query construction class (QueryBuilder) with the most popular extensions (eo, sar, sat, view, mlm).

The other functionality is a script that allows the user to build their own QueryBuilder class from extensions of their choosing, and allowing the opportunity to restrict the fields that can be queried (in the case where it isn't a required field and it's existence in the class might mislead the user).

cqlbuild

The cqlbuild is an interactive cli that allows for creating your own STAC cql2 query class.

Adding extensions

Add various STAC extensions to the builder. Leave blank to move to next step. In the below example we add the view, projection and mlm stac extensions.

 % cqlbuild
Enter extensions, either the path to a local file, a url or the extension json-ld name (sar, sat, etc):
STAC extension, file or url: view
treating input view like extension json-ld code
STAC extension, file or url: ./tests/test_data/mlm.schema.json
STAC extension, file or url: https://stac-extensions.github.io/projection/v2.0.0/schema.json
STAC extension, file or url:

Omitting fields from the query class interface

Omit fields from the query class interface by adding a field to ignore or a file with a list of fields to ignore.

Enter stac fields to omit from api or a path with a list of fields to omit:
Field to ignore (or file of fields): eo:snow_cover
Field to ignore (or file of fields): created
Field to ignore (or file of fields): ./tests/test_data/ignore_fields.txt
Field to ignore (or file of fields):

To prevent fields from being queryable through the generated STAC query interface.

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

cqlalchemy-0.0.6.tar.gz (22.6 kB view details)

Uploaded Source

Built Distribution

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

cqlalchemy-0.0.6-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file cqlalchemy-0.0.6.tar.gz.

File metadata

  • Download URL: cqlalchemy-0.0.6.tar.gz
  • Upload date:
  • Size: 22.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/20.6.0

File hashes

Hashes for cqlalchemy-0.0.6.tar.gz
Algorithm Hash digest
SHA256 837f4f8e1a81549c5939acf2fdb02defbfe8aee2b180e0d5b2051160dcc97cef
MD5 e0fbc87acadb293cf13001bdab8a4d8f
BLAKE2b-256 841aeb45adc895e20806d24603eaa8c359b5f212504695b967329dde37dac147

See more details on using hashes here.

File details

Details for the file cqlalchemy-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: cqlalchemy-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.13.0 Darwin/20.6.0

File hashes

Hashes for cqlalchemy-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d83bf60402e57696696a1b1dee8e67c424117e88dc4cf81d4fd5023450b85a7b
MD5 124693a5d0a120511312c900b0a62e38
BLAKE2b-256 48c638cc916e4880efa9a820f57bf308760353a8161447be75dc0929d45822e8

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