Skip to main content

Redash Dynamic Query

Project description

## Redash Dynamic Query

A tool for executing dynamic query of redash.

## Install

```
pip install redash-dynamic-query
```

## SYNOPSIS

```python
from redash_dynamic_query import RedashDynamicQuery

redash = RedashDynamicQuery(
endpoint='http://myredash-host',
apikey='secret_apikey',
data_source_id=2, # Optional, default auto fill
max_age=0, # Optional, default value is 0
max_wait=60, # Optional, default value is 60
)

query_id = 111
bind = {
'start_date': '2017-01-01T00:00:00',
'end_date': '2017-01-01T23:59:59',
}
result = redash.query(query_id, bind)
print(result['query_result']['data'])
# {
# 'rows': [
# {'mydata': 'xxx'}
# ],
# 'columns': [
# {
# 'type': 'string',
# 'friendly_name': 'mydata',
# 'name': 'mydata'
# }
# ]
# }
```

## LICENSE

MIT

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

redash-dynamic-query-1.0.3.tar.gz (3.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page