Skip to main content

Client library for DeskWatch

Project description

[![GitHub Actions badge](https://github.com/DeskWatch/dw-client/workflows/Build/badge.svg)](https://github.com/DeskWatch/dw-client/actions) [![PyPI](https://img.shields.io/pypi/v/dw-client)](https://pypi.org/project dw-client/) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black) [![Typechecking: Mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)

[Documentation](https://deskwatch.readthedocs.io/en/latest/)

Client library for DeskWatch in Python.

Please see the documentation for usage and examples.

## How to install

To install the latest git version directly from github without cloning, run pip install git+https://github.com/DeskWatch/dw-client.git

To install from a cloned version, cd into the directory and run poetry install to install inside an virtualenv. If you want to install it system-wide it can be installed with pip install ., but that has the issue that it might not get the exact version of the dependencies due to not reading the poetry.lock file.

## Debugging

  • Run python with LOG_LEVEL=debug to get additional debugging output

  • If invalid events have been queued for submission, you may need to delete the file-based queues generated by this library

  • To use the development version of this library use dw-client = {path = “../dw-client” } in pyproject.toml

## Examples

The examples/ directory contains a couple of example scripts, including:

  • time_spent_today.py - fetches all non-afk events and sums their duration to get the total active time for the day.

  • merge_buckets.py - merges two buckets with non-intersecting events by moving all events from one into the other.

  • redact_sensitive.py - redact sensitive events.

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

dw-client-0.0.3.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

dw_client-0.0.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file dw-client-0.0.3.tar.gz.

File metadata

  • Download URL: dw-client-0.0.3.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/60.9.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for dw-client-0.0.3.tar.gz
Algorithm Hash digest
SHA256 584d46d5a4fbea5edd90f164e00fc8f48f59cca7ba1a9268f882b13758f6c2dd
MD5 fcab7f22453455d6b93c0604864adf43
BLAKE2b-256 9bfcccb6aebce7eee6add5fe9d999822fbe569a8975a12982c898e3a540e00d4

See more details on using hashes here.

File details

Details for the file dw_client-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dw_client-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/60.9.3 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for dw_client-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 06fcf28538c438387466e6b1eff8cf2e56e527ccf35609aa8cdb6cb43399842d
MD5 a1908623336dc1567b6166be7810a406
BLAKE2b-256 9bfc0be485a1851d6b5eca210894a97810dfdb1da9c885b50b6aeb12b81b3b67

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