Skip to main content

Lightweight async CLI for Dimensions DSL queries

Project description

Shortwing

PyPI version Python versions License: MIT

Himalayan Shortwing

Lightweight CLI wrapper for Dimensions DSL queries via dimcli.

Installation

pip install shortwing

Usage

# Query as argument
shortwing "search grants for \"malaria\" return researchers"

# Query from stdin
echo 'search grants for "malaria"' | shortwing

# With subcommand
shortwing query "search grants return grants"

# Compact JSON output
shortwing --compact "search grants"

# Use a specific instance from dsl.ini
shortwing --instance test "search grants"

Configuration

Credentials are loaded in the following order of priority:

  1. CLI flags (--key, --endpoint)
  2. Environment variables (DIMENSIONS_KEY, DIMENSIONS_ENDPOINT)
  3. dsl.ini file (default)

Using dsl.ini (Recommended)

Shortwing uses the same dsl.ini configuration file as dimcli. Create the file at ~/.dimensions/dsl.ini:

[instance.live]
url=https://app.dimensions.ai
login=
password=
key=your-api-key

You can define multiple instances and select them with --instance:

[instance.live]
url=https://app.dimensions.ai
key=your-live-key

[instance.test]
url=https://test.dimensions.ai
key=your-test-key
shortwing --instance test "search grants"

Using Environment Variables

export DIMENSIONS_KEY=your-api-key
export DIMENSIONS_ENDPOINT=https://app.dimensions.ai  # optional

Using CLI Flags

shortwing --key your-api-key "search grants"
shortwing --key your-api-key --endpoint https://custom.endpoint.com "search grants"

Development

uv pip install .

Exit Codes

  • 0: Success
  • 1: Query/API error
  • 2: Configuration/authentication error

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

shortwing-0.2.1.tar.gz (256.2 kB view details)

Uploaded Source

Built Distribution

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

shortwing-0.2.1-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file shortwing-0.2.1.tar.gz.

File metadata

  • Download URL: shortwing-0.2.1.tar.gz
  • Upload date:
  • Size: 256.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shortwing-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cdc8de33e9ec499452e3a6c7b9090a359faa7e173c14ca076c71de157b96ef00
MD5 bd54a602ee3d5a58381ca9c96efdea31
BLAKE2b-256 0ff4339643fa1cfe86f913574c9ba37fce2e15619e704d9267858ec92b4fa387

See more details on using hashes here.

Provenance

The following attestation bundles were made for shortwing-0.2.1.tar.gz:

Publisher: python-publish.yml on kjgarza/shortwing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shortwing-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: shortwing-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for shortwing-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 343b3ad99bf6e1eb01a2460098cbf366a9a5499b7bcf733055cfec64ab1394ef
MD5 db7ec3a32a624711ae326b529a9a8b1c
BLAKE2b-256 46dc88442e4e8758ac81eb2416827eb6b5e8153b37a906289cc073f3bf53e54f

See more details on using hashes here.

Provenance

The following attestation bundles were made for shortwing-0.2.1-py3-none-any.whl:

Publisher: python-publish.yml on kjgarza/shortwing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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