LpuLive
Interact LpuLive programmatically using a simple Python Library. Allows you to search, conversation lookup, messages lookup, profile view etc.
Contents
Getting Started
Install this package from pypi
$ pip install lpulive
$ python
>>> from lpulive import User
>>>
Methods
See all Methods
Get Conversations
- To get all the active chat
- function takes no argument
- function return a
dictionaryobjectchats: list of all the chat active on users profileid: id of particular chatchat_name: name of the chatdate_time: last acitve message on that chatunread: total unread messages on that chat
total_chat: total group/private chat active on users profiles
Usage
from lpulive import User
regno = < Registration Number >
password = < Password >
user = User(registration_no=regno, password=password)
conversation_data = user.get_conversations()
print(conversation_data)
Get Messages
- To get all the messages of selected chat
- functions takes to argument chat_id, msg_thread
chat_id: to select a particular chat to get all messages [ required argument ]msg_thread: to turn on thread, this will also include the threads of messages ( if applicable ) [ default value isFalse]
- function return a
dictionaryobjectchat_id: id of the chatmessages: list of all the messages in that chatid: id number ( smaller the id newer the message )m_id: message idmessage: text messagefrom_user: message sender nameregno: message sender registration numberattachment: any attachment in that message ( if applicable )thread_message: get all the thread of a particular message ( ifmsg_threadisTrue)
chat_name: name of the chattotal_messages: total messages in that chatuser_name: name of current user
- functions takes to argument chat_id, msg_thread
Usage Without threads active
from lpulive import User
regno = < Registration Number >
password = < Password >
user = User(registration_no=regno, password=password)
chat_id = < chat id to search >
messages_data = user.get_messages(chat_id=chat_id)
print(messages_data)
Usage With threads active
- With threads active fetched messages will also have thread messages
- with active thread, data fetching may be little slow
messages_data = user.get_messages(chat_id=chat_id,msg_thread=True)
print(messages_data)
Get Message Threads
- To get the thread of particular message
- function takes to parameter
chat_id,msg_idchat_id: chat_id of the chatmsg_id: message id for which thread is to be extracted
- Function returns a
dictionaryobject of thread message of that messagechat_id: chat_id of the chatmsg_id: message id of the chatmessages: messages of all the threadtotal_thread: count of total messages in thread
- function takes to parameter
Usage
from lpulive import User
regno = < Registration Number >
password = < Password >
user = User(registration_no=regno, password=password)
chat_id = < chat_id to search >
msg_id = < m_id of a message to see the thread >
threads_data = user.get_message_threads(chat_id=chat_id,msg_id=msg_id)
print(threads_data)
Get Members
- To get all the members list in a particular channel
- function takes one argument
chat_idchat_id: chat_id of the chat
- function returns a
dictionaryobjectchat_id: chat_id of the chatmembers: list of membersname: name of the memberregno: registration numberprofile_img: profile image of the memberphone: phone number ( if available )
total_members: count fof total members
- function takes one argument
Usage
from lpulive import User
regno = < Registration Number >
password = < Password >
user = User(registration_no=regno, password=password)
chat_id = < chat id to search >
members_data = user.get_chat_members(chat_id=chat_id)
print(members_data)
User Search
- To search user
- function takes one argument
queryquery: search query
- function returns a
dictionaryobjectsearch_query: search queryusers: list of users foundid: idname: name of the userregno: registration number of the userdepartment: department/batch of the userprofile_img: profile image of the user
total_found: total user matched the query
Usage
from lpulive import User
regno = < Registration Number >
password = < Password >
user = User(registration_no=regno, password=password)
query = < search query >
search_data = user.search_users(query=query)
print(search_data)
Logout
- Logout the user from local session
- Clears up all the local cache
- function takes no argument
- function return a
stringobject
Usage
from lpulive import User
regno = < Registration Number >
password = < Password >
user = User(registration_no=regno, password=password)
logout_output=user.logout()
print(logout_output)
Made with 💜 in India
Release files for lpulive 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lpulive-0.3.0.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lpulive-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.0 kB
Release files / lpulive-0.3.0.tar.gz
| Download URL | lpulive-0.3.0.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f936ff372965a2631dc50f3e281ba3f6f3fc1f87447f0ce8db0d716635610f0c
|
|
BLAKE2b-256 checksum How to use checksums |
63895e1577327207d02adc3df7e5944d47708774a003275d614ae779a2fcff75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.1
|
Release files / lpulive-0.3.0-py3-none-any.whl
| Download URL | lpulive-0.3.0-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
16ff580689713419759d17b0416a6e02dec3e8d01cbbf1d703894a0e50bae64b
|
|
BLAKE2b-256 checksum How to use checksums |
d344a671720107905024bde4c6ef81c084c4e65cc501f80bd59a509baaf6e4ca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.0 CPython/3.10.1
|