tl-bot


Nametl-bot JSON
Version 0.1.2 PyPI version JSON
download
home_pagehttps://github.com/jakbin/t-bot
Summaryupload files to your telegram channel or group with your telegram bot
upload_time2024-10-13 01:58:26
maintainerNone
docs_urlNone
authorJak Bin
requires_python>=3
licenseNone
keywords telegram t-bot telegram-api telegram-api-bot telegram-file-upload telegram-upload
VCS
bugtrack_url
requirements tqdm requests requests-toolbelt
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # t-bot

Upload files to your Telegram channel or group with your telegram bot

 [![PyPI version](https://badge.fury.io/py/tl-bot.svg)](https://pypi.org/project/tl-bot/)
 [![Downloads](https://pepy.tech/badge/tl-bot/month)](https://pepy.tech/project/tl-bot)
 [![Downloads](https://static.pepy.tech/personalized-badge/tl-bot?period=total&units=international_system&left_color=green&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/tl-bot)
 ![GitHub Contributors](https://img.shields.io/github/contributors/jakbin/t-bot)
 ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jakbin/t-bot)
 ![GitHub last commit](https://img.shields.io/github/last-commit/jakbin/t-bot)
 ![Python 3.6](https://img.shields.io/badge/python-3.6-yellow.svg)


## Features
- Progress bar
- You can change file name before upload on telegram

Note : Bot can upload only 50 MB file (with default telegram bot api server url).


## Installation

```sh
pip3 install tl-bot
```

## Usage 
```sh
t-bot setup               # setup your telegram credentials
t-bot setup --cahtid -1001234567890 --token 1234:asdfgjkl --server http://127.0.0.1:8081      # setup your telegram credentials
t-bot reset               # reset to default your telegram credentials
t-bot test                # test telegram bot token
t-bot getid               # get chat id of your connected group or channel
t-bot up {file_name} -c file_caption       # upload Telegram channel or group
t-bot d {url} -c caption                   # download and upload file to your Telegram channel or group
```

# API

The anonfile-upload client is also usable through an API (for test integration, automation, etc)

### tl_bot.main.test_token(bot_token)

```py
from tl_bot.main import test_token

test_token(bot_token)   # bot_token type str
```

### tl_bot.main.uploader(bot_token: str, chat_id: str, file_name: str, server_url: str, caption: str)

```py
from tl_bot.main import uploader

uploader(bot_token, chat_id, file_name, server_url, caption)    # all arguments must be str
```

### tl_bot.main.download(url:str, bot_token:str, chat_id:str, caption:str)

```py
from tl_bot.main import download

download(url, bot_token, chat_id, caption)    # all arguments must be str
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/jakbin/t-bot",
    "name": "tl-bot",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "telegram, t-bot, telegram-api, telegram-api-bot, telegram-file-upload, telegram-upload",
    "author": "Jak Bin",
    "author_email": "jakbin4747@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/96/f6/6be2fd7997e4cc366e74169bb8d7d211bdd202b4fe49d7ff0b7fabf080ac/tl_bot-0.1.2.tar.gz",
    "platform": null,
    "description": "# t-bot\n\nUpload files to your Telegram channel or group with your telegram bot\n\n [![PyPI version](https://badge.fury.io/py/tl-bot.svg)](https://pypi.org/project/tl-bot/)\n [![Downloads](https://pepy.tech/badge/tl-bot/month)](https://pepy.tech/project/tl-bot)\n [![Downloads](https://static.pepy.tech/personalized-badge/tl-bot?period=total&units=international_system&left_color=green&right_color=blue&left_text=Total%20Downloads)](https://pepy.tech/project/tl-bot)\n ![GitHub Contributors](https://img.shields.io/github/contributors/jakbin/t-bot)\n ![GitHub commit activity](https://img.shields.io/github/commit-activity/m/jakbin/t-bot)\n ![GitHub last commit](https://img.shields.io/github/last-commit/jakbin/t-bot)\n ![Python 3.6](https://img.shields.io/badge/python-3.6-yellow.svg)\n\n\n## Features\n- Progress bar\n- You can change file name before upload on telegram\n\nNote : Bot can upload only 50 MB file (with default telegram bot api server url).\n\n\n## Installation\n\n```sh\npip3 install tl-bot\n```\n\n## Usage \n```sh\nt-bot setup               # setup your telegram credentials\nt-bot setup --cahtid -1001234567890 --token 1234:asdfgjkl --server http://127.0.0.1:8081      # setup your telegram credentials\nt-bot reset               # reset to default your telegram credentials\nt-bot test                # test telegram bot token\nt-bot getid               # get chat id of your connected group or channel\nt-bot up {file_name} -c file_caption       # upload Telegram channel or group\nt-bot d {url} -c caption                   # download and upload file to your Telegram channel or group\n```\n\n# API\n\nThe anonfile-upload client is also usable through an API (for test integration, automation, etc)\n\n### tl_bot.main.test_token(bot_token)\n\n```py\nfrom tl_bot.main import test_token\n\ntest_token(bot_token)   # bot_token type str\n```\n\n### tl_bot.main.uploader(bot_token: str, chat_id: str, file_name: str, server_url: str, caption: str)\n\n```py\nfrom tl_bot.main import uploader\n\nuploader(bot_token, chat_id, file_name, server_url, caption)    # all arguments must be str\n```\n\n### tl_bot.main.download(url:str, bot_token:str, chat_id:str, caption:str)\n\n```py\nfrom tl_bot.main import download\n\ndownload(url, bot_token, chat_id, caption)    # all arguments must be str\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "upload files to your telegram channel or group with your telegram bot",
    "version": "0.1.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/jakbin/t-bot/issues",
        "Homepage": "https://github.com/jakbin/t-bot"
    },
    "split_keywords": [
        "telegram",
        " t-bot",
        " telegram-api",
        " telegram-api-bot",
        " telegram-file-upload",
        " telegram-upload"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6c55c584abc8a6a76ed2684544fa2061f91bae768f0007e3045bb42d3f3575e",
                "md5": "04e40d2c76a41b1535abbe4252bb4386",
                "sha256": "ee3511f8468b02d8ddab9fc9cc0620000deccf5e24c770b51c1ab76c948c4636"
            },
            "downloads": -1,
            "filename": "tl_bot-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "04e40d2c76a41b1535abbe4252bb4386",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 7459,
            "upload_time": "2024-10-13T01:58:25",
            "upload_time_iso_8601": "2024-10-13T01:58:25.200147Z",
            "url": "https://files.pythonhosted.org/packages/b6/c5/5c584abc8a6a76ed2684544fa2061f91bae768f0007e3045bb42d3f3575e/tl_bot-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "96f66be2fd7997e4cc366e74169bb8d7d211bdd202b4fe49d7ff0b7fabf080ac",
                "md5": "637f7f62ad5871e90541fce94baec9e9",
                "sha256": "4284394a67e3742d68527caf05b7c63b5b1564d6f32d9140f73df61dbd6ef0fc"
            },
            "downloads": -1,
            "filename": "tl_bot-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "637f7f62ad5871e90541fce94baec9e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 6769,
            "upload_time": "2024-10-13T01:58:26",
            "upload_time_iso_8601": "2024-10-13T01:58:26.064636Z",
            "url": "https://files.pythonhosted.org/packages/96/f6/6be2fd7997e4cc366e74169bb8d7d211bdd202b4fe49d7ff0b7fabf080ac/tl_bot-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-13 01:58:26",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jakbin",
    "github_project": "t-bot",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "tqdm",
            "specs": []
        },
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "requests-toolbelt",
            "specs": []
        }
    ],
    "lcname": "tl-bot"
}
        
Elapsed time: 0.37830s