trakteerdonate


Nametrakteerdonate JSON
Version 1.0a2 PyPI version JSON
download
home_pagehttps://github.com/then77/trakteerdonate
SummaryAn easy way to listen for Trakteer donation in Python
upload_time2023-01-23 10:58:09
maintainer
docs_urlNone
authorRealzzy
requires_python>=3.6
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center"><b>⚠️ NOTE: THIS PROJECT IS ONLY FOR EDUCATIONAL PURPOSE!! ⚠️<br>I WONT RESPONSIBLE FOR SOMETHING HAPPEN WHEN USING THIS PROGRAM!!</b></p>

<h1 align="center">Trakteer Donate</h1>
<p align="center">An easy way to listen for Trakteer donation in Python</p>

## Installation
To install this package, you can easily use pip!
```bash
pip install trakteerdonate
```

Or,

```bash
pip install git+https://github.com/then77/trakteerdonate
```

## Package Usage
1. First open your **Trakteer** and go to **Stream Overlay** ([here](https://trakteer.id/manage/stream-settings))
2. On the **Widget URL**, copy the key, and the hash
3. Create a code and import the `Client` function.
```python
from trakteerdonate import Client
client = Client("hash", "streamKey")
# Replace "hash" and "streamKey" with the key you copied before
```
4. Add listener for donation
```python
@client.event
async def on_donation(ws, data):
    print("Received donation:")
    print(f"  - Name: {data.name}")
    print(f"  - Amount: {data.amount}")
    print(f"  - Message: {data.message}")
```
5. Last, add this code **To the bottom of the code** and run!
```python
client.start()
```

The reason it should be placed on the bottom because its a blocking function.

## Example Code
```python
from trakteerdonate import Client

client = Client("hash", "streamKey")

@client.event
async def on_connect(ws):
    print("Connected to Trakteer!")

@client.event
async def on_donation(ws, data):
    print("Received donation:")
    print(f"  - Name: {data.name}")
    print(f"  - Amount: {data.amount}")
    print(f"  - Message: {data.message}")

client.start()
```

## Repository License
This repository and its code is under the MIT License. [Read more here](https://github.com/then77/trakteerdonate/blob/main/LICENSE).



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/then77/trakteerdonate",
    "name": "trakteerdonate",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Realzzy",
    "author_email": "hello@therealzzy.xyz",
    "download_url": "https://files.pythonhosted.org/packages/d9/c8/bc117232d4de022aaee1448866f2fabd3b30dc7cac73a368f41817cd3eaa/trakteerdonate-1.0a2.tar.gz",
    "platform": null,
    "description": "<p align=\"center\"><b>\u26a0\ufe0f NOTE: THIS PROJECT IS ONLY FOR EDUCATIONAL PURPOSE!! \u26a0\ufe0f<br>I WONT RESPONSIBLE FOR SOMETHING HAPPEN WHEN USING THIS PROGRAM!!</b></p>\n\n<h1 align=\"center\">Trakteer Donate</h1>\n<p align=\"center\">An easy way to listen for Trakteer donation in Python</p>\n\n## Installation\nTo install this package, you can easily use pip!\n```bash\npip install trakteerdonate\n```\n\nOr,\n\n```bash\npip install git+https://github.com/then77/trakteerdonate\n```\n\n## Package Usage\n1. First open your **Trakteer** and go to **Stream Overlay** ([here](https://trakteer.id/manage/stream-settings))\n2. On the **Widget URL**, copy the key, and the hash\n3. Create a code and import the `Client` function.\n```python\nfrom trakteerdonate import Client\nclient = Client(\"hash\", \"streamKey\")\n# Replace \"hash\" and \"streamKey\" with the key you copied before\n```\n4. Add listener for donation\n```python\n@client.event\nasync def on_donation(ws, data):\n    print(\"Received donation:\")\n    print(f\"  - Name: {data.name}\")\n    print(f\"  - Amount: {data.amount}\")\n    print(f\"  - Message: {data.message}\")\n```\n5. Last, add this code **To the bottom of the code** and run!\n```python\nclient.start()\n```\n\nThe reason it should be placed on the bottom because its a blocking function.\n\n## Example Code\n```python\nfrom trakteerdonate import Client\n\nclient = Client(\"hash\", \"streamKey\")\n\n@client.event\nasync def on_connect(ws):\n    print(\"Connected to Trakteer!\")\n\n@client.event\nasync def on_donation(ws, data):\n    print(\"Received donation:\")\n    print(f\"  - Name: {data.name}\")\n    print(f\"  - Amount: {data.amount}\")\n    print(f\"  - Message: {data.message}\")\n\nclient.start()\n```\n\n## Repository License\nThis repository and its code is under the MIT License. [Read more here](https://github.com/then77/trakteerdonate/blob/main/LICENSE).\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An easy way to listen for Trakteer donation in Python",
    "version": "1.0a2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d9c8bc117232d4de022aaee1448866f2fabd3b30dc7cac73a368f41817cd3eaa",
                "md5": "35fa413bb9a70529e4c431413c3566b8",
                "sha256": "e8e13e0a269e085722976d5b42e13e0644324ef7381f7063bff089973ed5b451"
            },
            "downloads": -1,
            "filename": "trakteerdonate-1.0a2.tar.gz",
            "has_sig": false,
            "md5_digest": "35fa413bb9a70529e4c431413c3566b8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 6001,
            "upload_time": "2023-01-23T10:58:09",
            "upload_time_iso_8601": "2023-01-23T10:58:09.385645Z",
            "url": "https://files.pythonhosted.org/packages/d9/c8/bc117232d4de022aaee1448866f2fabd3b30dc7cac73a368f41817cd3eaa/trakteerdonate-1.0a2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-23 10:58:09",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "then77",
    "github_project": "trakteerdonate",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "trakteerdonate"
}
        
Elapsed time: 0.08358s