Metadata-Version: 2.1
Name: aw-client
Version: 0.5.7
Summary: Client library for ActivityWatch
Home-page: https://activitywatch.net/
License: MPL-2.0
Author: Erik Bjäreholt
Author-email: erik@bjareho.lt
Requires-Python: >=3.7,<4.0
Classifier: License :: OSI Approved
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: aw-core (>=0.5.7,<0.6.0)
Requires-Dist: click (>=8.0,<9.0)
Requires-Dist: persist-queue (>=0.6.0,<0.7.0)
Requires-Dist: requests (>=2.22,<3.0)
Project-URL: Documentation, https://docs.activitywatch.net/
Project-URL: Repository, https://github.com/ActivityWatch/aw-client/
Description-Content-Type: text/markdown

aw-client
=========

[![GitHub Actions badge](https://github.com/ActivityWatch/aw-client/workflows/Build/badge.svg)](https://github.com/ActivityWatch/aw-client/actions)
[![PyPI](https://img.shields.io/pypi/v/aw-client)](https://pypi.org/project/aw-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://activitywatch.readthedocs.io/en/latest/)

Client library for ActivityWatch 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/ActivityWatch/aw-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 `aw-client = {path = "../aw-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.

