Skip to content

How can I store the data directly into my own database? #1022

Answered by BelKed
jiojiojackson asked this question in Q&A
Discussion options

You must be logged in to vote

If you are familiar with Python, you can use the aw-client library to retrieve the data from ActivityWatch. After processing the data in the Python script, you can use another library to communicate with your MySQL database to store the data there.

If you want to use any other programming language, you can connect to ActivityWatch via the API and the process would be similar.


If you want to avoid using the ActivityWatch server altogether, you can listen on the default ActivityWatch port (5600) where all watchers send their data, and then store the data in your database.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ErikBjare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1020 on February 05, 2024 16:47.