Metadata-Version: 2.4
Name: plaud-ai
Version: 0.1.0
Summary: Python SDK for plaud.ai API
Maintainer-email: Dmytro Litvinov <me@dmytrolitvinov.com>
License: MIT License
Project-URL: Homepage, https://github.com/DmytroLitvinov/python-plaud-ai
Project-URL: Issues, https://github.com/DmytroLitvinov/python-plaud-ai/issues
Project-URL: Changelog, https://github.com/DmytroLitvinov/python-plaud-ai/blob/main/CHANGELOG.md
Keywords: plaud,plaud.ai
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Dynamic: license-file

# Plaud AI API client 📓

[![PyPI](https://img.shields.io/pypi/v/plaud-ai?style=flat-square)](https://pypi.python.org/pypi/plaud-ai/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/plaud-ai?style=flat-square)](https://pypi.python.org/pypi/plaud-ai/)
[![PyPI - License](https://img.shields.io/pypi/l/plaud-ai?style=flat-square)](https://pypi.python.org/pypi/plaud-ai/)

---
**Documentation**: [https://docs.plaud.ai/documentation/get_started/overview](https://docs.plaud.ai/documentation/get_started/overview)

**Source Code**: [https://github.com/DmytroLitvinov/python-plaud-ai](https://github.com/DmytroLitvinov/python-plaud-ai)

**PyPI**: [https://pypi.org/project/plaud-ai/](https://pypi.org/project/plaud-ai/)

---

Python API wrapper around Plaud AI API. Feel free to contribute and make it better! 🚀

**NOTE**: Since it is early release, some of the API endpoints may not be implemented yet. If you need some specific endpoint, feel free to create an issue or pull request.
Also, library can be changed in the future, so be careful with the updates as for now.

## Installation

```sh
pip install plaud-ai
```

## Usage

1) Request creating APP for you via [Plaud API Survey](https://docs.google.com/forms/d/e/1FAIpQLSdndvVU1mcRGg_E7YURPEtB13R1zHs55T-234AC6STJyW1n8w/viewform) (taken link from [documentation](https://docs.plaud.ai/documentation/get_started/overview))


```python
# Example of using Plaud AI API to generate API token
from plaud_ai import PlaudAIAPIClient

client_id = 'xxxxxxxxxxxxxxx'
secret_key = 'yyyyyyyyyyyyyyy'

plaud_ai = PlaudAIAPIClient()
token_response = plaud_ai.api_token.generate_token(client_id, secret_key)
print(token_response.data, token_response.response_code)
api_token = token_response.data['api_token']

# Example of using Plaud AI API client to list devices
from plaud_ai import PlaudAIAPIClient

api_token = 'xxxxxxxxxxxxxxx'

plaud_ai = PlaudAIAPIClient(api_token)

devices_response = plaud_ai.devices_api.list()
print(devices_response.data, devices_response.response_code)
```

## Webhooks

```python
import json

from plaud_ai import is_valid_signature

payload_body = json.dumps(request.json).encode('utf-8')
signature_header = request.headers.get('Plaud-Signature')
webhook_secret = 'your_webhook_secret'

res = is_valid_signature(payload_body, signature_header, webhook_secret)
```

## License

This project is licensed under the terms of the [MIT license](https://github.com/DmytroLitvinov/python-plaud-ai/blob/main/LICENSE).


### HOW TO MAKE A RELEASE

* Add changes to `CHANGELOG.md`
* Change version in `plaud_ai/__init__.py` and `pyproject.toml`
* `source .env/bin/activate`
* `python3 -m build --sdist --wheel`
* `twine upload dist/*`

Could be issues with `license-file` and other. Run next command to fix it:
* `pip install -U twine setuptools packaging build`
