Hata
A blazing fast Discord API wrapper that you can't deny
Support Guild | Topical documentation | Examples | Technical documentation | Source
New hata versions use Discord API V10 .
About
Hata is an asynchronous Discord API wrapper built on top of scarletio. It is designed to be easy to use, with also providing rich API offering everything what an advanced developer might need.
Named after Hata no Kokoro from Touhou Project.
Why hata?
-
Multiple simultaneous clients
Hata can run multiple clients from the same instance without sacrificing performance.
-
Performant
Fast concurrent code based on async/await paradigm with cache control, PyPy support and much more!
-
Newest API features
Whatever Discord decides to release/update/break Hata will support it natively in no time!
-
100% Python
Built in Python! Easy to code, easy to read, easy to maintain.
Usage
Simple example implementing a ping command.
from hata import Client, Guild, wait_for_interruption
GUILD = Guild.precreate(guild_id)
Seija = Client('TOKEN', extensions = ['slash'])
@Seija.events
async def ready(client):
print(f'{client:f} logged in.')
@Seija.interactions(guild = GUILD)
async def ping():
"""ping-pong"""
return 'pong'
Seija.start()
wait_for_interruption()
Hata leaves the main thread free, client.start() blocks it only till the client logs in (or fails it), although you
can still use the start_clients() function, what as it says, starts up all the non-running clients parallelly.
Sometimes leaving the main thread might cause problems when trying to shut down the bot(s). At this case, you might
want to use wait_for_interruption(), which disconnects the clients gracefully and closes the event loop on keyboard
interrupt.
Installation
To install Hata simply do
$ python3 -m pip install hata
And you are good to go! Hata has native pypy support as well if you need some more speed!
Dependencies
Requirements
Optional
Get in touch
If you have issues, suggestions, want to contribute, or just want to hang out, join our discord server.
Acknowledgements
Shout-Out to our brave testers who are helping the most to improve Hata!
Metadata
Release files for hata 1.3.100
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hata-1.3.100.tar.gz | 2.0 MB | Without provenance | Details for hata-1.3.100.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hata-1.3.100-py3-none-any.whl | Python 3 | none | any | Details for hata-1.3.100-py3-none-any.whl |
Total release size: 4.6 MB
Release files / hata-1.3.100.tar.gz
| Download URL | hata-1.3.100.tar.gz |
|---|---|
| Size | 2.0 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9bd0be4bc0f468ac6105555a75cd6080b6c333b8656472ff7c8ba522867c432c
|
|
BLAKE2b-256 checksum How to use checksums |
90ec841605d9b6f0385ebbfd7c098af9dd900ba07be4db4e6c314e38e89a8888
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.32.3 setuptools/50.3.2 requests-toolbelt/0.10.1 tqdm/4.50.2 CPython/3.8.20
|
Release files / hata-1.3.100-py3-none-any.whl
| Download URL | hata-1.3.100-py3-none-any.whl |
|---|---|
| Size | 2.6 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4cc9a6be48046cf63c33bc51be35397742f353b456aeabe33b1b8913245e6126
|
|
BLAKE2b-256 checksum How to use checksums |
4c59e35f7dd64d5f1d302b41ff3091620d096fb97f3765dfa2faaf9e563b31e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.32.3 setuptools/50.3.2 requests-toolbelt/0.10.1 tqdm/4.50.2 CPython/3.8.20
|
Security for hata 1.3.100
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.