Skip to main content


LogQS Logo

LogQS Client

A Python library for interacting with a LogQS DataStore API. More information and examples can be found at https://docs.logqs.com.

Installation

Requires Python >= 3.6

Instally from PyPI, using pip:

$ pip install logqs-client

Quickstart

Create a client instance:

from lqs_client import LogQS
lqs = LogQS(
    api_url="<LQS API URL>",
    api_key_id="<LQS API KEY ID>",
    api_key_secret="<LQS API KEY SECRET>"
)

Interact with the LogQS API:

response = lqs.list.log()
data = response["data"]
print(data)

Alternatively, you can use the LogQS Client from the command line. If you have the configuration set as environment variables or in a .env file:

$ python -m lqs_client list log

Configuration

Required Parameters

The LogQS Client requires three parameters to be configured:

LQS_API_URL

  The URL of the endpoint for the LogQS API. This should be the base URL for all REST operations, i.e., if the DataStore's API includes a /api subpath, this should be included.

  This parameter can be supplied/overridden with the api_url parameter.

LQS_API_KEY_ID

  The ID of the API Key for which the client will operate as.

  This parameter can be supplied/overridden with the api_key_id parameter.

LQS_API_KEY_SECRET

  The secret of the API Key for which the client will operate as.

  This parameter can be supplied/overridden with the api_key_secret parameter.

Optional Parameters

Optional parameters include:

LQS_PRETTY

  A boolean parameter indicating whether or not to "prettify" the output results. Useful when using the client in the command line. Default is false.

  This parameter can be supplied/overrident with the pretty parameter.

LQS_VERBOSE

  A boolean parameter indicating whether to log debug information. Default is false.

  This parameter can be supplied/overriden with the verbose parameter.

LQS_DRY_RUN

  A boolean parameter indicating whether to execute actual API requests. Default is false.

  This parameter can be supplied/overriden with the dry_run parameter.

LQS_RETRY_COUNT

  An integer parameter greater than or equal to 0 indicating the number of times we should retry failed API requests. Default is 4

  This parameter can be supplied/overriden with the retry_count parameter.

LQS_RETRY_DELAY

  An integer parameter greater than or equal to 0 indicating the initial value, in seconds, we use for exponential backoff when waiting to retry a failed request. Default is 4

  This parameter can be supplied/overriden with the retry_delay parameter.

LQS_RETRY_AGRESSIVE

  A boolean parameter indicating whether we should retry on "expected" errors from LogQS (such as "BadRequest", "Conflict", etc.). Default is false.

  This parameter can be supplied/overriden with the retry_aggressive parameter.

Development

The LogQS Client module source is located in lqs-client and it's Python requirements are listed in the requirements.txt file. You can install it locally with pip install ..

The project uses Python 3.9, which may require some dependencies to be required. In one go,

sudo apt install python3.9 python3.9-dev python3.9-distutils python3.9-venv

To run the application from this directory (i.e., for development):

  1. Create a virtual environment:

    python3.9 -m venv venv

  2. Source the environment:

    source venv/bin/activate

  3. Install the requirements:

    pip install -r requirements.txt

  4. Install LogQS Client in develop mode:

    pip install -e .

  5. Run the module:

    python -m lqs-client

Metadata

Release files for lqs-client 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lqs-client 0.1.13
File Size Uploaded Provenance Actions
lqs_client-0.1.13.tar.gz 66.5 kB Without provenance Details for lqs_client-0.1.13.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lqs-client 0.1.13
File Interpreter ABI Platform Actions
lqs_client-0.1.13-py3-none-any.whl Python 3 none any Details for lqs_client-0.1.13-py3-none-any.whl

Total release size: 168.1 kB

Release files / lqs_client-0.1.13.tar.gz

Download URL lqs_client-0.1.13.tar.gz
Size 66.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5d3cbbf9cf6862a50c511c99cabfcdfa105dd2d38b26451310419725e3df5c75
BLAKE2b-256 checksum
How to use checksums
31ff598135a81f0356d698373a49eecf95a57be7b7e59c54403ef48e48b96300
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Release files / lqs_client-0.1.13-py3-none-any.whl

Download URL lqs_client-0.1.13-py3-none-any.whl
Size 101.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c4e440d3411ee642c7ace61f3a5cc95b3f378808a899ad852089d19dca6c662f
BLAKE2b-256 checksum
How to use checksums
630395ebf2d453bdd4fbba82e1e56de638a56eef102f9086b59a794ba3ae754c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.12

Security for lqs-client 0.1.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.13 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page