Skip to main content

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.

Invite

Acknowledgements

Shout-Out to our brave testers who are helping the most to improve Hata!

Metadata

Release files for hata 1.3.101

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hata 1.3.101
File Size Uploaded Provenance Actions
hata-1.3.101.tar.gz 2.0 MB Without provenance Details for hata-1.3.101.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hata 1.3.101
File Interpreter ABI Platform Actions
hata-1.3.101-py3-none-any.whl Python 3 none any Details for hata-1.3.101-py3-none-any.whl

Total release size: 4.6 MB

Release files / hata-1.3.101.tar.gz

Download URL hata-1.3.101.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
39282da82c9404494a0ce1234104b24d5a47f0b96ced46725e55b443b4f4318d
BLAKE2b-256 checksum
How to use checksums
7c65d588392b0d9b19a6b4964866c50b6a96946742a5e49d1ecf8d12727e29c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Release files / hata-1.3.101-py3-none-any.whl

Download URL hata-1.3.101-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
cc1ca9993611eb85acf401fa63e2bd6668665fbfb342676f939c5027c3f9c5f1
BLAKE2b-256 checksum
How to use checksums
6a8ec536675a3f98109ab94ce15b511bfa904da6690345cc98a25a209c94763c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.20

Security for hata 1.3.101

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.

Release history Release notifications | RSS feed

This release

1.3.101 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page