Skip to main content

zlapi: Zalo API for Python

Project description

This project is a relocation

This project is a project to be relocated from zaloapi because this module has been removed from Pypi and the reason is unknown.

zlapi - Zalo API (Website) for Python

Project version Supported python versions: >= 3. and pypy License: MIT License Documentation

A powerful and efficient library to interact with Zalo Website. This is not an official API, Zalo has that over here for chat bots. This library differs by using a normal Zalo account instead (More flexible).

zlapi currently support:

  • Custom style for message.

  • Sending many types of messages, with files, stickers, mentions, etc.

  • Fetching messages, threads and users info.

  • Creating groups, setting the group, creating polls, etc.

  • Listening for, an reacting to messages and other events in real-time.

  • And there are many other things.

  • async/await (Coming Soon).

Essentially, everything you need to make an amazing Zalo Bot!

Caveats

zlapi works by imitating what the browser does, and thereby tricking Zalo into thinking it’s accessing the website normally.

However, there’s a catch! Using this library may not comply with Zalo’s Terms Of Service!, so be We are not responsible if your account gets banned or disabled!

With that out of the way, you may go to Docs to see the full documentation!

Installation

pip install zlapi

If you don’t have pip, this guide can guide you through the process.

You can also install directly from source, provided you have pip>=19.0:

pip install git+https://github.com/Its-VrxxDev/zlapi.git

Example Usage

from zlapi import ZaloAPI
from zlapi.models import *

imei = "<imei>"
cookies = "<cookies>"
client = ZaloAPI("<phone>", "<password>", imei=imei, session_cookies=cookies)
client.send(Message(text="Hi Myself!"), thread_id=client.uid, thread_type=ThreadType.USER)

More examples are available here.

Contact

Acknowledgments

This project was originally inspired by fbchat.

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

zlapi-1.0.0.tar.gz (20.3 kB view details)

Uploaded Source

Built Distribution

zlapi-1.0.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file zlapi-1.0.0.tar.gz.

File metadata

  • Download URL: zlapi-1.0.0.tar.gz
  • Upload date:
  • Size: 20.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for zlapi-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0b8e9759665b435e3d89d3f12e6327183924e1509ec6f12089bf4048f992fba4
MD5 e4f77fb24badd110193710d4e41fb13a
BLAKE2b-256 b321125c4f636f6d6d10f88573968b9bbc6cb123b4368e4438dba431d0598a40

See more details on using hashes here.

File details

Details for the file zlapi-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: zlapi-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for zlapi-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 01bc0fb632d29bb4d9188b46d5abac3816c2c160626c7d11adc4e037e05420a8
MD5 bba44a8d27eec9c176a0c562545b6ced
BLAKE2b-256 0e05aef8a1475828005ef95bd64d21132e777813b08cc81e454d71b6a90d27c6

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