donatello-1.0.5
توضیحات
🐍 Python API wrapper for Ukrainian donate service Donatello
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | donatello-1.0.5 |
| نام | donatello |
| نسخه کتابخانه | 1.0.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | selfkilla666 & Beengoo |
| ایمیل نویسنده | selfkilla666 <selfkilla666@yahoo.com>, Beengoo <olddft@gmail.com> |
| آدرس صفحه اصلی | https://github.com/selfkilla666/donatello |
| آدرس اینترنتی | https://pypi.org/project/donatello/ |
| مجوز | MIT License (MIT) |
# Donatello.py






🐍 Unofficial Python wrapper for working with the API of the Ukrainian service for donations [Donatello](https://donatello.to/)
[GitHub](https://github.com/selfkilla666/donatello/) | [PyPI](https://pypi.org/project/donatello/) | [Discord server](https://discord.gg/donatello-498101952333479956)
<br>
[Українська версія](https://github.com/selfkilla666/donatello/blob/main/README_UK.md)
---
## Quickstart
Before you start, you need to take a couple of steps
1) First you need to create a Donatello token and enable the API functionality, all this can be done in your account on the API page
2) You need to install the library via `pip install donatello`
### Get me as User
If you need to get information about the user with which you authenticated through a token, then this can be done through the convenient `get_me()` method
```python
from donatello import Donatello
token = "<YOUR TOKEN HERE>"
client = Donatello(token)
me = client.get_me()
# print your account nickname
print(me.nickname)
```
### Get donations
You may need to get a list of your donations, and there is a `get_donates()` method specifically for this, which will return you a convenient list of them
```python
from donatello import Donatello
token = "<YOUR TOKEN HERE>"
client = Donatello(token)
# size = 5 - get 5 last donates
donates = client.get_donates(size = 5)
for donate in donates:
print(f"{donate.client_name}: {donate.message}")
```
### Get top donators
You can get top donators using the `get_clients()` method
```python
from donatello import Donatello
token = "<YOUR TOKEN HERE>"
client = Donatello(token)
donators = client.get_clients()
for donator in donators:
print(f"{donator.client_name}: {donator.total_amount}")
```
---
## In future
- [ ] Add async API driver
- [ ] Add docs
- [ ] Longpolling / Events
- [ ] Support new features in Donatello API
نیازمندی
| مقدار | نام |
|---|---|
| - | aiohttp |
| - | requests |
| - | pydantic |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7.0 | Python |
نحوه نصب
نصب پکیج whl donatello-1.0.5:
pip install donatello-1.0.5.whl
نصب پکیج tar.gz donatello-1.0.5:
pip install donatello-1.0.5.tar.gz