Socket
Book a DemoInstallSign in
Socket

teleredis

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

teleredis

Redis backend for Telethon session storage

pipPyPI
Version
0.1.3
Maintainers
1

Telethon Redis session

A Telethon_ session storage implementation backed by Redis.

.. _Telethon: https://github.com/LonamiWebs/Telethon

Usage

This session implementation can store multiple Sessions in the same key hive.

Installing

.. code-block:: sh

    pip3 install teleredis

Upgrading

.. code-block:: sh

    pip3 install -U teleredis

Quick start

.. code-block:: python

    from telethon import TelegramClient
    from teleredis import RedisSession
    import redis

    # These example values won't work. You must get your own api_id and
    # api_hash from https://my.telegram.org, under API Development.
    api_id = 12345
    api_hash = '0123456789abcdef0123456789abcdef'

    redis_connector = redis.Redis(host='localhost', port=6379, db=0, decode_responses=False)
    session = RedisSession('session_name', redis_connector)
    client = TelegramClient(session, api_id, api_hash)
    client.start()

Keywords

telegram session sessions redis

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts