TelegramDB - A library which uses your telegram account as a database for your projects

Overview

TelegramDB

A library which uses your telegram account as a database for your projects.

Basic Usage

from pyrogram import Client
from telegram import TelegramDB, DataPack, Member

client = Client("session_name", getenv("API_ID"), getenv("API_HASH"))
client.start()
SESSION = TelegramDB(client, getenv("DB_CHAT_ID"))

class TestData(DataPack):
    __datapack_name__ = "test"

    id = Member(int, is_primary=True)
    name = Member(str)

    def __init__(self, id):
        self.id = id

SESSION.prepare_datapack(TestData)

test = TestData(777000)
test.name = "Telegram"
SESSION.commit(test)

Installation

You can install this library by using standard pip command.

pip install TelegramDB

Requirements

  • Python 3.8 or higher
  • A telegram client

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update examples as appropriate.

License

GPLv3
Licensed Under GNU General Public License v3

You might also like...
MyReplitDB - the most simplistic and easiest wrapper to use for replit's database system.

MyReplitDB is the most simplistic and easiest wrapper to use for replit's database system. Installing You can install it from the PyPI Or y

A Simple , โ˜๏ธ Lightweight ,  ๐Ÿ’ช Efficent JSON based database for ๐Ÿ Python.
A Simple , โ˜๏ธ Lightweight , ๐Ÿ’ช Efficent JSON based database for ๐Ÿ Python.

A Simple, Lightweight, Efficent JSON based DataBase for Python The current stable version is v1.6.1 pip install pysondb==1.6.1 Support the project her

Decentralised graph database management system

Decentralised graph database management system To get started clone the repo, and run the command below. python3 database.py Now, create a new termina

A Persistent Embedded Graph Database for Python
A Persistent Embedded Graph Database for Python

Cog - Embedded Graph Database for Python cogdb.io New release: 2.0.5! Installing Cog pip install cogdb Cog is a persistent embedded graph database im

A Painless Simple Way To Create Schema and Do Database Operations Quickly In Python
A Painless Simple Way To Create Schema and Do Database Operations Quickly In Python

PainlessDB - Taking Your Pain away to the moon ๐Ÿš€ Contribute ยท Community ยท Documentation ๐ŸŽซ Introduction : PainlessDB is a Python-based free and open-

HTTP graph database built in Python 3

KiwiDB HTTP graph database built in Python 3. Reference Format References are strings in the format: {refIDENTIFIER@GROUP} Authentication Currently, t

A NoSQL database made in python.

CookieDB A NoSQL database made in python.

Tiny local JSON database for Python.
Tiny local JSON database for Python.

Pylowdb Simple to use local JSON database ๐Ÿฆ‰ # This is pure python, not specific to pylowdb ;) db.data['posts'] = ({ 'id': 1, 'title': 'pylowdb is awe

PathfinderMonsterDatabase - A database of all monsters in Pathfinder 1e, created by parsing aonprd.com

PathfinderMonsterDatabase A database of all monsters in Pathfinder 1e, created by parsing aonprd.com Setup Run the following line to install all requi

Comments
  • Change library name to TelegramDB

    Change library name to TelegramDB

    Already a python module python-telegram-bot have this name telegram. image So Change library name to anything otherwise we can't use python-telegram-bot and your telegramdb at same time or in one script

    enhancement 
    opened by VarnaX-279 4
Releases(v0.2.0)
  • v0.2.0(Jan 23, 2022)

    What's Changed

    • Added support for python 3.6 and 3.7
    • Added support for telethon clients
    • Added delete(), get_all() methods
    • Depricated telegram module
    • Added documentations, click here to open.
    • Changed library name to telegramdb by @VarnaX-279 in https://github.com/AnimeKaizoku/TelegramDB/pull/2
    • Add missing imports in usage by @FayasNoushad in https://github.com/AnimeKaizoku/TelegramDB/pull/4
    • Few more fixes and improvements

    New Contributors

    • @VarnaX-279 made their first contribution in https://github.com/AnimeKaizoku/TelegramDB/pull/2
    • @FayasNoushad made their first contribution in https://github.com/AnimeKaizoku/TelegramDB/pull/4

    Full Changelog: https://github.com/AnimeKaizoku/TelegramDB/compare/v0.1.0...v0.2.0

    Source code(tar.gz)
    Source code(zip)
  • v0.1.0(Jan 21, 2022)

Owner
Kaizoku
Kaizoku
ClutterDB - Extremely simple JSON database made for infrequent changes which behaves like a dict

extremely simple JSON database made for infrequent changes which behaves like a dict this was made for ClutterBot

Clutter Development 1 Jan 12, 2022
TinyDB is a lightweight document oriented database optimized for your happiness :)

Quick Links Example Code Supported Python Versions Documentation Changelog Extensions Contributing Introduction TinyDB is a lightweight document orien

Markus Siemens 5.6k Dec 30, 2022
Manage your sqlite database very easy (like django) ...

Manage your sqlite database very easy (like django) ...

aWolver 1 Feb 9, 2022
Python object-oriented database

ZODB, a Python object-oriented database ZODB provides an object-oriented database for Python that provides a high-degree of transparency. ZODB runs on

Zope 574 Dec 31, 2022
This is a simple graph database in SQLite, inspired by

This is a simple graph database in SQLite, inspired by "SQLite as a document database".

Denis Papathanasiou 1.2k Jan 3, 2023
Elara DB is an easy to use, lightweight NoSQL database that can also be used as a fast in-memory cache.

Elara DB is an easy to use, lightweight NoSQL database written for python that can also be used as a fast in-memory cache for JSON-serializable data. Includes various methods and features to manipulate data structures in-memory, protect database files and export data.

Saurabh Pujari 101 Jan 4, 2023
Python function to extract all the rows from a SQLite database file while iterating over its bytes, such as while downloading it

Python function to extract all the rows from a SQLite database file while iterating over its bytes, such as while downloading it

Department for International Trade 16 Nov 9, 2022
LightDB is a lightweight JSON Database for Python

LightDB What is this? LightDB is a lightweight JSON Database for Python that allows you to quickly and easily write data to a file Installing pip3 ins

Stanislaw 14 Oct 1, 2022
A simple GUI that interacts with a database to keep track of a collection of US coins.

CoinCollectorGUI A simple gui designed to interact with a database. The goal of the database is to make keeping track of collected coins simple. The G

Builder212 1 Nov 9, 2021
Makes google's political ad database actually useful

Making Google's political ad transparency library suck less This is a series of scripts that takes Google's political ad transparency data and makes t

The Guardian 7 Apr 28, 2022