A simple async wrapper for the Wakatime API
Project description
Installation
pip install awakatime
Usage
It's recommended to use a context manager to create an instance of the client.
import asyncio
from awakatime import Awakatime
async def main():
async with Awakatime("your_api_key") as awakatime:
tasks = [awakatime.get_all_time(), awakatime.get_projects()]
all_time, projects = await asyncio.gather(*tasks)
print(all_time)
print(projects)
if __name__ == "__main__":
coro = main()
asyncio.run(coro)
Development
git clone https://github.com/controlado/awakatime.git
cd awakatime
With Poetry
poetry install --with dev
Without Poetry
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
Instalação
pip install awakatime
Uso
O ideal é usar o gerenciador de contexto para criar uma instância do cliente.
import asyncio
from awakatime import Awakatime
async def main():
async with Awakatime("sua_chave_da_api") as awakatime:
tasks = [awakatime.get_all_time(), awakatime.get_projects()]
all_time, projects = await asyncio.gather(*tasks)
print(all_time)
print(projects)
if __name__ == "__main__":
coro = main()
asyncio.run(coro)
Desenvolvimento
git clone https://github.com/controlado/awakatime.git
cd awakatime
Com o Poetry
poetry install --with dev
Sem o Poetry
python -m venv .venv
source .venv/bin/activate
pip install -r requirements-dev.txt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
awakatime-1.1.8.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file awakatime-1.1.8.tar.gz
.
File metadata
- Download URL: awakatime-1.1.8.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cea06aced9817ebfc614251d0f51e6dca4a8eb7fb3cc25df01bf6f95d48481b |
|
MD5 | fdf39c4a5f58e940aae5a46cfa9fc07f |
|
BLAKE2b-256 | 41e05fb174f0a5cf5deaec6d60df83419de4435b8a5733dad8269186763ef20c |
File details
Details for the file awakatime-1.1.8-py3-none-any.whl
.
File metadata
- Download URL: awakatime-1.1.8-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.5.1 CPython/3.11.4 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67bd4b0328dc27de3008332499c1412f090788dc4656dc3d5710dfd441ac8823 |
|
MD5 | 502e4deaed4f2ba9a2bf32396be1a718 |
|
BLAKE2b-256 | 8b0fbc49736530bb21a5f0b387c69ea18c585da181af0753f5ddb3ae83573779 |