A client for the Signal stickers API
Project description
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.com
, so information defined there (tags, etc.) will not be fetched.
This client connects to the Signal sticker API. Please do not flood it.
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
(string): the pack id. Equals topack_id
;key
(string): the pack key. Equals topack_key
;title
(string): the title of the pack;author
(string): the author of the pack;nb_stickers
(int): the number of stickers in the pack;cover
(Sticker
): the cover sticker;stickers
(list): the list of stickers in the pack (which areSticker
objects).
A Sticker
object exposes the following attributes:
id
(int): the id of the sticker in the pack;emoji
(string): 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, and typewindow.reduxStore.getState().items.uuid_id
to get your USER, andwindow.reduxStore.getState().items.password
to get your PASSWORD.
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
Hashes for signalstickers-client-3.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cda0ba4e1e4928b7cb4623e3a5ddee19da127b409f231b2edc200ec71dd0c440 |
|
MD5 | 2858969d714dc35e65d833507fc08a8a |
|
BLAKE2b-256 | 9f0f14067cf00a553d87e80684a40471064eb933e715acf52df02acd5812ab23 |
Hashes for signalstickers_client-3.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 77f31b1b438555f35e524ab8687176cc2b2399c62f83e1b71ceaca489ccbaaf1 |
|
MD5 | 2000c00420d65d866dfa90dcf67f1f4f |
|
BLAKE2b-256 | d5444f86cbdddc938c80685b3d4219d936679fac874ecde2f102892fbf883aac |