semvec/pypi-packages huggingface dataset:
redash-dynamic-query 1.0.4
Redash Dynamic Query
License: MIT
Keywords: redash

## 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'
#         }
#     ]
# }
```

## CLI

```
% rdq
```

```
% rdq --help

usage: rdq [-h] [-d N] [-a N] [-w N] [-k APIKEY] [-e ENDPOINT] -q QUERY_ID
           [-p QUERY_PARAMETERS] [-f {csv,tsv,json,redash_csv}]

Process some integers.

optional arguments:
  -h, --help            show this help message and exit
  -d N, --data-source-id N
                        an integer for the data_source_id
  -a N, --max-age N     an integer for the max_age
  -w N, --max-wait N    an integer for the max_wait(timeout)
  -k APIKEY, --apikey APIKEY
                        required: redash apikey (can also be specified using
                        REDASH_APIKEY environment variable)
  -e ENDPOINT, --endpoint ENDPOINT
                        required: redash endpoint (can also be specified using
                        REDASH_ENDPOINT environment variable)
  -q QUERY_ID, --query-id QUERY_ID
                        required: redash query id
  -p QUERY_PARAMETERS, --query-parameters QUERY_PARAMETERS
                        redash query parameters(eg. key1=val1,key2=val2)
  -f {csv,tsv,json,redash_csv}, --output-format {csv,tsv,json,redash_csv}
                        redash output format
```

```
# example
% rdq -e http://myredash-host -k secret_apikey -q 111 -p start_date=2017-01-01T00:00:00,end_date=2017-01-01T23:59:59 -f csv
```

## LICENSE

MIT
unifi-client 0.0.1.2
Ubiquiti Unifi REST API Client.
License: MIT
Keywords: metric prometheus unifi ubnt ubiquiti ap access point

# unifi_client

Install it via

```bash

pip install unifi_client

```

## Usage

```python

from unifi_client import AirMaxAPIClient

unifi = AirMaxAPIClient(
    url="https://air.max.example.com",
    username="username",
    password="password",
    verify=False,
    proxy="socks5h://localhost:5050"
    )

unifi.login() # Login to device

unifi.statistics() # Get all the statistics from device

unifi.logout() # Logout from device
```
geokey-epicollect 1.0.3
Use EpiCollect to collect data for GeoKey
License: MIT

.. image:: https://img.shields.io/pypi/v/geokey-epicollect.svg
    :alt: PyPI Package
    :target: https://pypi.python.org/pypi/geokey-epicollect

.. image:: https://img.shields.io/travis/ExCiteS/geokey-epicollect/master.svg
    :alt: Travis CI Build Status
    :target: https://travis-ci.org/ExCiteS/geokey-epicollect

.. image:: https://img.shields.io/coveralls/ExCiteS/geokey-epicollect/master.svg
    :alt: Coveralls Test Coverage
    :target: https://coveralls.io/r/ExCiteS/geokey-epicollect

geokey-epicollect
=================

Use `EpiCollect <http://www.epicollect.net>`_'s phone app as a mobile client to collect data and store it with `GeoKey <http://geokey.org.uk>`_.

Install
-------

geokey-epicollect requires:

- Python version 2.7
- GeoKey version 1.6 or greater

Make sure the dependencies are installed:

.. code-block:: console

    sudo apt-get install libxslt1-dev libxml2-dev

Install the extension from PyPI:

.. code-block:: console

    pip install geokey-epicollect

Or from cloned repository:

.. code-block:: console

    cd geokey-epicollect
    pip install -e .

Add the package to installed apps:

.. code-block:: console

    INSTALLED_APPS += (
        ...
        'geokey_epicollect',
    )

Migrate the models into the database:

.. code-block:: console

    python manage.py migrate geokey_epicollect

You're now ready to go!

Test
----

Run tests:

.. code-block:: console

    python manage.py test geokey_epicollect

Check code coverage:

.. code-block:: console

    coverage run --source=geokey_epicollect manage.py test geokey_epicollect
    coverage report -m --omit=*/tests/*,*/migrations/*
geokey-export 0.4.3
Export data from GeoKey to KML, GeoJSON, CSV
License: MIT

.. image:: https://img.shields.io/pypi/v/geokey-export.svg
    :alt: PyPI Package
    :target: https://pypi.python.org/pypi/geokey-export

.. image:: https://img.shields.io/travis/ExCiteS/geokey-export/master.svg
    :alt: Travis CI Build Status
    :target: https://travis-ci.org/ExCiteS/geokey-export

.. image:: https://img.shields.io/coveralls/ExCiteS/geokey-export/master.svg
    :alt: Coveralls Test Coverage
    :target: https://coveralls.io/r/ExCiteS/geokey-export

geokey-export
=============

Export data from GeoKey into various formats.

Currently supported formats:

- KML
- GeoJSON
- CSV

Install
-------

geokey-export requires:

- Python version 2.7
- GeoKey version 1.6 or greater

Install the extension from PyPI:

.. code-block:: console

    pip install geokey-export

Or from cloned repository:

.. code-block:: console

    cd geokey-export
    pip install -e .

Add the package to installed apps:

.. code-block:: python

    INSTALLED_APPS += (
        ...
        'geokey_export',
    )

Migrate the models into the database:

.. code-block:: console

    python manage.py migrate geokey_export

Copy static files:

.. code-block:: console

    python manage.py collectstatic

You're now ready to go!

Test
----

Run tests:

.. code-block:: console

    python manage.py test geokey_export

Check code coverage:

.. code-block:: console

    coverage run --source=geokey_export manage.py test geokey_export
    coverage report -m --omit=*/tests/*,*/migrations/*
structlog-boilerplate 0.2
Simple wrapper for CLI script which can use all advantages of structlog
License: MIT

<a href="https://github.com/IaroslavR/structlog-boilerplate/blob/master/LICENSE"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-green.svg"></a> 
<a href="https://github.com/ambv/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
<a href="https://docs.python.org/3.6/"><img alt="Python: 3.6" src="https://upload.wikimedia.org/wikipedia/commons/3/34/Blue_Python_3.6_Shield_Badge.svg"></a>

Simple wrapper for CLI script which can use all advantages of [structlog](http://www.structlog.org/en/stable/index.html) and can work with modules which use old good standard lib `logging` as well

**Q** Why I need it?  
**A** [Write Logs for Machines, use JSON](https://web.archive.org/web/20170801134840/https://journal.paul.querna.org/articles/2011/12/26/log-for-machines-in-json/)

### Usage
By default [script](/examples/app.py) behave like a proper [12 factor](https://12factor.net/logs) app that outputs only JSON to `stdout` and leave the logs of libraries that use `logging` unchanged  

`python ./examples/app.py`

```
Boom!!!!
Bang!
Wow, exception
Traceback (most recent call last):
  File "/home/mirror/PycharmProjects/structlog-boilerplate/examples/libs/sdt_lib.py", line 14, in f
    1 / 0
ZeroDivisionError: division by zero
{'event': 'Boom!!!!', 'logger': 'libs.structlog_lib', 'level': 'critical', 'timestamp': '2018-11-03T09:25:19.002335Z'}
{'event': 'Bang!', 'logger': 'libs.structlog_lib', 'level': 'error', 'timestamp': '2018-11-03T09:25:19.002424Z'}
{'event': 'Wow, exception', 'logger': 'libs.structlog_lib', 'level': 'error', 'timestamp': '2018-11-03T09:25:19.002550Z', 'exception': 'Traceback (most recent call last):\n  File "/home/mirror/PycharmProjects/structlog-boilerplate/examples/libs/structlog_lib.py", line 15, in f\n    1 / 0\nZeroDivisionError: division by zero'}
{"event": "result", "timestamp": "2018-11-03T09:25:19.002736Z", "value": 42}
```


But if verbosity level escalates, script produces developer friendly colored output  

`python ./examples/app.py -vv`

![colored output](https://user-images.githubusercontent.com/9788811/47950630-a8f5f500-df4c-11e8-9375-b61a83844dd8.png)