Skip to main content

🐍 Python API wrapper for Ukrainian donate service Donatello

Project description

Donatello.py

Made with Python MIT License Version: 1.0.7 PyPI - Downloads

🐍 Unofficial Python wrapper for working with the API of the Ukrainian service for donations Donatello

GitHub | PyPI | Discord server


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

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

from donatello import Donatello


token = "<YOUR TOKEN HERE>"
client = Donatello(token)

donates = client.get_donates(size = 5) # "size = 5" - Get 5 last donates

for donate in donates:
    print(f"{donate.client_name}: {donate.message}")

Get top donators

You can get top donators using the get_clients() method

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

donatello-1.0.7.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

donatello-1.0.7-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file donatello-1.0.7.tar.gz.

File metadata

  • Download URL: donatello-1.0.7.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for donatello-1.0.7.tar.gz
Algorithm Hash digest
SHA256 76e1af4823df90e7d5cf56b1973941d766be652969113df637b54775d3098608
MD5 a7da31743eb79bcd90ddaa843978d2f2
BLAKE2b-256 c75f4d2512060808c70341debc555580ececbb4c3eaa7cc4b7eea9a9d574be26

See more details on using hashes here.

File details

Details for the file donatello-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: donatello-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for donatello-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2f92f3d806b881586afee1ff406eb0be4ff76027dd3405736dfe483d4e982590
MD5 78ebe14f8a87ad1caf0482105c5d0ec7
BLAKE2b-256 a5583cd7115f637695817c6fc9ee17af24b409768df2b88ba6383751019da32c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page