A client for the Signal stickers API
Project description
NOTICE
This is a fork from https://github.com/signalstickers/signalstickers-client
This fork adds typing and remove dependencies version caps
Python client for Signal stickers
A client to interact with the Signal stickers API.
- Fetch sticker packs
- Get images files
- Upload sticker packs
- etc.
Note: despite its name, this client does not interacts with
signalstickers.org
, so information defined there (tags, etc.) will not be fetched.
This client connects to the Signal sticker API. Please do not flood it (you'll be blocked anyway).
Installation
pip3 install --user signalstickers-client
This module requires cryptography
, protobuf
, anyio
, and httpx
(but they
should be installed with the previous command).
Usage
If you are not familiar with Signal stickers, read STICKERS_INTERNALS.md first.
Downloading a pack
The StickerPack
object returned by await StickersClient().get_pack(<pack_id>, <pack_key>)
exposes the following
attributes:
id: str
the pack id. Equals topack_id
;key: str
the pack key. Equals topack_key
;title: str
the title of the pack;author: str
the author of the pack;nb_stickers: int
the number of stickers in the pack;cover: Sticker
the cover sticker;stickers: list[Sticker]
the list of stickers in the pack
A Sticker
object exposes the following attributes:
id: int
the id of the sticker in the pack;emoji: str
the emoji mapped to this sticker;image_data: bytes
the webp image of the sticker.
Uploading a pack
Same thing, but use LocalStickerPack
(that does not contains id
and key
)
instead of StickerPack
.
You will need your Signal credentials!
To obtain them, run the Signal Desktop app with the flag --enable-dev-tools
,
open the Developer Tools, change the JavaScript context from top
to
Electron Isolated Context
(cf. video below), and type
window.reduxStore.getState().items.uuid_id
to get your USER, and
window.reduxStore.getState().items.password
to get your PASSWORD.
Video: how to set JavaScript context
Example usage
Development
- Create a
pipenv
withpipenv install --dev
; - Edit the code you want;
- Don't forget to launch tests with
pipenv run py.test
.
License
See LICENSE
Legal
This is not an official Signal project. This is an independant project.
Signal is a registered trademark in the United States and other countries.
Author
Romain Ricard contact+stickerclient@romainricard.fr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file signalstickers_client_fork_laggykiller-3.3.0.post2.tar.gz
.
File metadata
- Download URL: signalstickers_client_fork_laggykiller-3.3.0.post2.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee79e4eef927a51a83634760363631398ddc30ff0c047a2fa0244e2cd9036d33 |
|
MD5 | 01b241c17afd2bb7aca6c961ee07ce02 |
|
BLAKE2b-256 | 16312a0b43a99713bb3290cc8d898262c2e4a8fa64ec229c9987734710de00ab |
File details
Details for the file signalstickers_client_fork_laggykiller-3.3.0.post2-py3-none-any.whl
.
File metadata
- Download URL: signalstickers_client_fork_laggykiller-3.3.0.post2-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.8.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaa29b0976a68c8c1559576097ed56f551d3997af911438de2e8abf2219346c8 |
|
MD5 | 656ef0dcade8d99703f2ad4f43057b28 |
|
BLAKE2b-256 | 48841d3c7998e838a7d3e7fa2d992de6a58579f44e6ee5456fa8ca7f385f967a |