Metadata-Version: 2.1
Name: awakatime
Version: 1.1.8
Summary: A simple async wrapper for the Wakatime API
Home-page: https://github.com/controlado/awakatime
License: MIT
Keywords: wakatime,api-wrapper,asyncio,async
Author: Yan Gabriel
Author-email: yangabrielogy@gmail.com
Requires-Python: >=3.11,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Framework :: AsyncIO
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: Portuguese (Brazilian)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: aiohttp[speedups] (>=3.8.5,<4.0.0)
Project-URL: Documentation, https://awakatime.readthedocs.io/en/latest/
Project-URL: Repository, https://github.com/controlado/awakatime
Description-Content-Type: text/markdown

<div align="center">
    <h1>🔃 Awakatime</h1>
    <p>An asynchronous API wrapper for Wakatime</p>
    <a href="https://wakatime.com/badge/github/controlado/awakatime">
        <img src="https://wakatime.com/badge/github/controlado/awakatime.svg" alt="wakatime">
    </a>
    <a href="https://discordapp.com/users/854886148455399436">
        <img src="https://dcbadge.vercel.app/api/shield/854886148455399436?style=flat" alt="discord">
    </a>
    <br>
    <a href="https://github.com/controlado/awakatime/issues/new">
        <img src="https://img.shields.io/badge/Report%20a%20bug-gray" alt="report">
    </a>
    <a href="https://awakatime.readthedocs.io/en/latest/?badge=latest">
        <img src="https://readthedocs.org/projects/awakatime/badge/?version=latest" alt="documentation">
    </a>
    <a href="README.md">
        <img src="https://img.shields.io/badge/English-bright" alt="english">
    </a>
    <a href="README.br.md">
        <img src="https://img.shields.io/badge/Português-bright" alt="português">
    </a>
    <br>
    <a href="https://codecov.io/gh/controlado/awakatime">
        <img src="https://codecov.io/gh/controlado/awakatime/branch/main/graph/badge.svg?token=86DTBWW41H">
    </a>
    <a href="https://pypi.org/project/awakatime/">
        <img src="https://img.shields.io/pypi/v/awakatime?color=red" alt="pypi">
    </a>
    <img src="https://img.shields.io/github/license/controlado/awakatime?color=red" alt="license">
</div>

## Installation

```bash
pip install awakatime
```

## Usage

It's recommended to use a context manager to create an instance of the client.

```python
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

<details>
    <summary>With Poetry</summary>

    poetry install --with dev

</details>

<details>
    <summary>Without Poetry</summary>

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements-dev.txt

</details>

<div align="center">
    <h1>🔃 Awakatime</h1>
    <p>Uma API wrapper assíncrona para o Wakatime</p>
    <a href="https://wakatime.com/badge/github/controlado/awakatime">
        <img src="https://wakatime.com/badge/github/controlado/awakatime.svg" alt="wakatime">
    </a>
    <a href="https://discordapp.com/users/854886148455399436">
        <img src="https://dcbadge.vercel.app/api/shield/854886148455399436?style=flat" alt="discord">
    </a>
    <br>
    <a href="https://github.com/controlado/awakatime/issues/new">
        <img src="https://img.shields.io/badge/Report%20a%20bug-gray" alt="report">
    </a>
    <a href="https://awakatime.readthedocs.io/en/latest/?badge=latest">
        <img src="https://readthedocs.org/projects/awakatime/badge/?version=latest" alt="documentation">
    </a>
    <a href="README.md">
        <img src="https://img.shields.io/badge/English-bright" alt="english">
    </a>
    <a href="README.br.md">
        <img src="https://img.shields.io/badge/Português-bright" alt="português">
    </a>
    <br>
    <a href="https://codecov.io/gh/controlado/awakatime">
        <img src="https://codecov.io/gh/controlado/awakatime/branch/main/graph/badge.svg?token=86DTBWW41H">
    </a>
    <a href="https://pypi.org/project/awakatime/">
        <img src="https://img.shields.io/pypi/v/awakatime?color=red" alt="pypi">
    </a>
    <img src="https://img.shields.io/github/license/controlado/awakatime?color=red" alt="license">
</div>

## Instalação

```bash
pip install awakatime
```

## Uso

O ideal é usar o gerenciador de contexto para criar uma instância do cliente.

```python
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

<details>
    <summary>Com o Poetry</summary>

    poetry install --with dev

</details>

<details>
    <summary>Sem o Poetry</summary>

    python -m venv .venv
    source .venv/bin/activate
    pip install -r requirements-dev.txt

</details>

