This release is a pre-release and may not be stable for production use.
An unofficial Facebook Messenger Wrapper for Python.
# Installation
```
pip install messenger-wrapper
```
# Developping
for developer
```
Python-Messenger-Wrapper$ pip3 install -e .
```
---
testing
```
Python-Messenger-Wrapper$ python3 tests/tests.py
```
individual testing
```
Python-Messenger-Wrapper$ python3 -m unittest tests.test_set.TestSet.test_save_admin
```
# Example
Login
```python
from meesenger import login
session, c_user, fb_dtsg = login.get_session(user, passwd)
```
Logout
```python
from meesenger import logout
logout(session, fb_dtsg)
```
Pull
```python
from messenger import Pull
p = Pull()
while True:
for data in p.get(session, c_user):
...
```
## Integrated Wrapping
Same as individual usage without passing first three parameters(session, c_user, fb_dtsg)
```python
from messenger import Messenger
m = Messenger(session, c_user, fb_dtsg)
# get.get_threads(session, c_user, fb_dtsg, limit=10, before=None)
m.get_threads(limit=10, before=None)
```
## Individual Use Scenarios
### Getting
Get friends
```python
from meesenger import get
friends = get.get_friends(session, c_user, fb_dtsg)
for uid, f in friends.items():
...
```
Get message
```python
from meesenger import get
messages = get.get_msg(session, c_user, fb_dtsg, recipient_id, 10, before=None)
for m in messages:
...
```
Get threads
```python
from meesenger import get
threads = get.get_threads(session, c_user, fb_dtsg, limit=10, before=None)
for t in threads:
...
```
### Sending
Send message
```python
from messenger import send
body = 'Hello, world'
recipient_id = 'fb user id'
send.send_msg(session, c_user, fb_dtsg, recipient_id, body, group=True)
```
Upload file
Send file
### Setting
Set emoji
```python
from messenger import setting
thread_id = 'thread id'
emoji = '👍'
setting.set_emoji(session, c_user, fb_dtsg, thread_id, emoji)
```
Set nickname
```python
from messenger import setting
thread_id = 'thread id'
participant = 'member user id'
new_name = 'new nickname'
setting.set_nickname(session, c_user, fb_dtsg, thread_id, participant, new_name)
```
Set thread name
```python
from messenger import setting
new_name = 'new name'
thread_id = 'thread id'
setting.set_thread_name(session, c_user, fb_dtsg, thread_id, new_name)
```
Add people into group
```python
from messenger import setting
thread_id = 'thread id'
participants = ['participant 1', 'participant 2']
setting.add_participant(session, c_user, fb_dtsg, thread_id, participants)
```
Remove from group
```python
from messenger import setting
thread_id = 'thread id'
participant = 'member user should be removed'
setting.rm_participant(session, c_user, fb_dtsg, thread_id, participant)
```
Make admin
```python
from messenger import setting
thread_id = 'thread id'
member_id = 'member user should be made as admin'
setting.save_admin(session, c_user, fb_dtsg, thread_id, member_id, add=True)
```
Remove admin
```python
from messenger import setting
thread_id = 'thread id'
member_id = 'member user should be removed from admin'
setting.save_admin(session, c_user, fb_dtsg, thread_id, member_id, add=False)
```
Leave group
```python
from messenger import setting
setting.leave_group(session, c_user, fb_dtsg, thread_id)
```
Metadata
Release files for messengerwrapper 0.0.1.dev1
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 |
|---|---|---|---|---|
| messengerwrapper-0.0.1.dev1.tar.gz | 11.8 kB | Without provenance | Details for messengerwrapper-0.0.1.dev1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| messengerwrapper-0.0.1.dev1-py3-none-any.whl | Python 3 | none | any | Details for messengerwrapper-0.0.1.dev1-py3-none-any.whl |
Total release size: 34.1 kB
Release files / messengerwrapper-0.0.1.dev1.tar.gz
| Download URL | messengerwrapper-0.0.1.dev1.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab60e7a687bfbf5837278cfccf3f2d53ecf4d87dcabb9999e79490d7cf6e430a
|
|
BLAKE2b-256 checksum How to use checksums |
4be26d26c2626a1a6fc8c89e5d058798d222c702822931ab6e067524e3c85295
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / messengerwrapper-0.0.1.dev1-py3-none-any.whl
| Download URL | messengerwrapper-0.0.1.dev1-py3-none-any.whl |
|---|---|
| Size | 22.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f52b219d9917d6edc7597ddaf703df463ad8cde4f359a7315c0be925895ea0b9
|
|
BLAKE2b-256 checksum How to use checksums |
7dcfbd9e6b3bb77769066d7cf9d67b7f9d0513863e831e9bd4875d0da18b4fa6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for messengerwrapper 0.0.1.dev1
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.