Skip to main content

A simple Python SDK for Eitaa API

Project description

Pyeitaa

A simple Python SDK for interacting with the Eitaa API.

Lightweight and easy-to-use wrapper for Eitaa messenger API.

🚀 Installation

pip install pyeitaa

🔑 How do I get a token?

Get your token from:

"https://eitaayar.ir/" (https://eitaayar.ir/)


⚡ Quick Start

from pyeitaa import Eitaa

bot = Eitaa("YOUR_TOKEN")

print(bot.get_me())


💬 Send Message

bot.send_message( chat_id="123456", text="Hello from Pyeitaa!" )

This method sends a text message to a channel or group.

Parameters

  • "chat_id" (required) Unique identifier of the channel or group. You can also use the username without "@".

    Example:

    • "chat_id="eitaayar""
    • "chat_id="1404""
  • "text" (required) Message content to send.

  • "title" (optional) Internal title used for search and display purposes.

  • "disable_notification" (optional) Sends the message silently without notification.

  • "reply_to_message_id" (optional) Sends the message as a reply.

  • "date" (optional) Unix timestamp for scheduled sending.

  • "pin" (optional) Pins the message after sending.

  • "viewCountForDelete" (optional) Deletes the message after reaching a specific view count.


📎 Send File

bot.send_file( chat_id="123456", file_path="image.png", caption="Hello file" )

This method sends media or files.

Parameters

  • "chat_id" (required) Channel or group identifier.

  • "file_path" (required) Path to the file.

  • "caption" (optional) Caption text for the file.


📌 Important Notes

  • To send a GIF file, rename the extension to ".gif"

Example:

sample.mp4 → sample.gif

  • To send a sticker, rename the extension to ".webp"

Example:

sample.png → sample.webp


⚠️ Exceptions

from pyeitaa.exceptions import EitaaError, EitaaAuthError

try: bot.get_me()

except EitaaAuthError: print("Invalid token")

except EitaaError: print("General error")


🧠 Features

  • Simple and clean API
  • File upload support
  • Custom exceptions
  • Lightweight ("httpx")
  • Easy to extend

📦 Project Status

Alpha version ("0.1.0")


🛠 Requirements

  • Python 3.8+
  • httpx

📌 Roadmap

  • Async support
  • Webhook system
  • Retry mechanism
  • Rate limiting
  • Better response objects

📄 License

This project is licensed under the MIT License.

See: "LICENSE" (LICENSE)

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

pyeitaa-0.1.2.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyeitaa-0.1.2-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file pyeitaa-0.1.2.tar.gz.

File metadata

  • Download URL: pyeitaa-0.1.2.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pyeitaa-0.1.2.tar.gz
Algorithm Hash digest
SHA256 4cf65942e4c3b16b87f365103952db5f516d87be55a6caa2f74c129731ecb89a
MD5 77f30cbaccc7f2b8e29e57a3e7f43973
BLAKE2b-256 418cddcd5494bbf674e2c96abb87bbfca86f9d0d9c494ccb91ebc0884fcaebc7

See more details on using hashes here.

File details

Details for the file pyeitaa-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyeitaa-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pyeitaa-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 00772f936b64954578525306054855037727dd99c612502ededbba8113389286
MD5 4f9328d2ddec0ca918249ed26387f619
BLAKE2b-256 350cbee4dbca14ceada186d28f03ea21f387a20d23f36ef703aa56f7cbfe26c1

See more details on using hashes here.

Supported by

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