Skip to main content

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 (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 to pack_id;
  • key: str the pack key. Equals to pack_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

https://github.com/signalstickers/signalstickers-client/assets/7778898/ca3f1fec-e908-49d9-88a8-e33d0ee9a453

Example usage

See examples/

Development

  • Create a pipenv with pipenv 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

Metadata

Release files for signalstickers-client 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for signalstickers-client 3.3.0
File Size Uploaded
signalstickers-client-3.3.0.tar.gz 15.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for signalstickers-client 3.3.0
File Interpreter ABI Platform
signalstickers_client-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.8 kB

Release files / signalstickers-client-3.3.0.tar.gz

Download URL signalstickers-client-3.3.0.tar.gz
Size 15.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e5b7bf49d561087f2517656adac269b7d47d86d18efb08fe43b0a9f12f0d657a
BLAKE2b-256 checksum
How to use checksums
44d26a06ff2e43dadc846922619c8898db08b00f26d8da171cfb3cc2357dc35d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / signalstickers_client-3.3.0-py3-none-any.whl

Download URL signalstickers_client-3.3.0-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dafab869f954b0f2f16fecf8be610d363f4a6e047e411a6b3ee253f30ea52263
BLAKE2b-256 checksum
How to use checksums
0d0f7c8b908a5143e8d0b2c3c0e583894537a007f7d56d796ef5deddb9efd2ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

3.2.0

2 release files

3.1.0

2 release files

3.0.0

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.0.5

2 release files

1.0.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page