signalstickers-client


Namesignalstickers-client JSON
Version 3.3.0 PyPI version JSON
download
home_pagehttps://github.com/romainricard/signalstickers-client
SummaryA client for the Signal stickers API
upload_time2023-08-20 13:27:17
maintainer
docs_urlNone
authorRomain Ricard
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python client for Signal stickers

A client to interact with the [Signal](https://signal.org/) 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

```bash
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](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.

<details>
  <summary><i>Video: how to set JavaScript context</i></summary>

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

</details>


## Example usage

[See `examples/`](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](https://github.com/romainricard/signalstickers-client/blob/master/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>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/romainricard/signalstickers-client",
    "name": "signalstickers-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Romain Ricard",
    "author_email": "contact+stickerclient@romainricard.fr",
    "download_url": "https://files.pythonhosted.org/packages/44/d2/6a06ff2e43dadc846922619c8898db08b00f26d8da171cfb3cc2357dc35d/signalstickers-client-3.3.0.tar.gz",
    "platform": null,
    "description": "# Python client for Signal stickers\n\nA client to interact with the [Signal](https://signal.org/) stickers API.\n\n+ Fetch sticker packs\n+ Get images files\n+ Upload sticker packs\n+ etc.\n\n\n> Note: despite its name, this client does not interacts with\n> `signalstickers.com`, so information defined there (tags, etc.) will **not**\n> be fetched.\n\n> This client connects to the Signal sticker API. Please **do not flood it**\n> (you'll be blocked anyway).\n\n## Installation\n\n```bash\npip3 install --user signalstickers-client\n```\n\nThis module requires `cryptography`, `protobuf`, `anyio`, and `httpx` (but they\nshould be installed with the previous command).\n \n## Usage\n\nIf you are not familiar with Signal stickers, read\n[STICKERS_INTERNALS.md](STICKERS_INTERNALS.md) first.\n\n### Downloading a pack\nThe `StickerPack` object returned by `await\nStickersClient().get_pack(<pack_id>, <pack_key>)` exposes the following\nattributes:\n\n+ `id: str` the pack id. Equals to `pack_id`;\n+ `key: str` the pack key. Equals to `pack_key`;\n+ `title: str` the title of the pack;\n+ `author: str` the author of the pack;\n+ `nb_stickers: int` the number of stickers in the pack;\n+ `cover: Sticker` the cover sticker;\n+ `stickers: list[Sticker]` the list of stickers in the pack\n\nA `Sticker` object exposes the following attributes:\n\n+ `id: int` the id of the sticker in the pack;\n+ `emoji: str` the emoji mapped to this sticker;\n+ `image_data: bytes` the webp image of the sticker.\n\n\n### Uploading a pack\n\nSame thing, but use `LocalStickerPack` (that does not contains `id` and `key`)\ninstead of `StickerPack`.\n\n**You will need your Signal credentials!**\n\nTo obtain them, run the Signal Desktop app with the flag `--enable-dev-tools`,\nopen the Developer Tools, **change the JavaScript context from `top` to\n`Electron Isolated Context`** (cf. video below), and type\n`window.reduxStore.getState().items.uuid_id` to get your USER, and\n`window.reduxStore.getState().items.password` to get your PASSWORD.\n\n<details>\n  <summary><i>Video: how to set JavaScript context</i></summary>\n\nhttps://github.com/signalstickers/signalstickers-client/assets/7778898/ca3f1fec-e908-49d9-88a8-e33d0ee9a453\n\n</details>\n\n\n## Example usage\n\n[See `examples/`](examples/)\n\n## Development\n\n+ Create a `pipenv` with `pipenv install --dev`;\n+ Edit the code you want;\n+ Don't forget to launch tests with `pipenv run py.test`.\n\n## License\n\nSee\n[LICENSE](https://github.com/romainricard/signalstickers-client/blob/master/LICENSE)\n\n\n## Legal\n\nThis is not an official Signal project. This is an independant project.  \nSignal is a registered trademark in the United States and other countries.\n\n\n## Author\n\nRomain Ricard <contact+stickerclient@romainricard.fr>\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A client for the Signal stickers API",
    "version": "3.3.0",
    "project_urls": {
        "Homepage": "https://github.com/romainricard/signalstickers-client"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d0f7c8b908a5143e8d0b2c3c0e583894537a007f7d56d796ef5deddb9efd2ca",
                "md5": "8f4827b8b4a5a79f72f260bc3a319ce1",
                "sha256": "dafab869f954b0f2f16fecf8be610d363f4a6e047e411a6b3ee253f30ea52263"
            },
            "downloads": -1,
            "filename": "signalstickers_client-3.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8f4827b8b4a5a79f72f260bc3a319ce1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 16603,
            "upload_time": "2023-08-20T13:27:15",
            "upload_time_iso_8601": "2023-08-20T13:27:15.925651Z",
            "url": "https://files.pythonhosted.org/packages/0d/0f/7c8b908a5143e8d0b2c3c0e583894537a007f7d56d796ef5deddb9efd2ca/signalstickers_client-3.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "44d26a06ff2e43dadc846922619c8898db08b00f26d8da171cfb3cc2357dc35d",
                "md5": "b2f48567e57a0f6cbcc317a759e8678f",
                "sha256": "e5b7bf49d561087f2517656adac269b7d47d86d18efb08fe43b0a9f12f0d657a"
            },
            "downloads": -1,
            "filename": "signalstickers-client-3.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b2f48567e57a0f6cbcc317a759e8678f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 15169,
            "upload_time": "2023-08-20T13:27:17",
            "upload_time_iso_8601": "2023-08-20T13:27:17.728215Z",
            "url": "https://files.pythonhosted.org/packages/44/d2/6a06ff2e43dadc846922619c8898db08b00f26d8da171cfb3cc2357dc35d/signalstickers-client-3.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-20 13:27:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "romainricard",
    "github_project": "signalstickers-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "signalstickers-client"
}
        
Elapsed time: 0.73681s