{"id":19583914,"url":"https://github.com/nonprojects/tgbox","last_synced_at":"2026-03-13T18:31:12.919Z","repository":{"id":45089381,"uuid":"365198403","full_name":"NonProjects/tgbox","owner":"NonProjects","description":"Encrypted cloud storage Protocol based on Telegram","archived":false,"fork":false,"pushed_at":"2024-04-14T09:37:15.000Z","size":1925,"stargazers_count":30,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"indev","last_synced_at":"2024-04-14T09:59:30.274Z","etag":null,"topics":["api","async","cloud-storage","encrypted-files","python3","telegram"],"latest_commit_sha":null,"homepage":"https://tgbox.readthedocs.io/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NonProjects.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-05-07T10:32:19.000Z","updated_at":"2024-04-15T15:27:05.408Z","dependencies_parsed_at":"2024-01-22T13:35:15.773Z","dependency_job_id":"bc4eff94-010f-4aa0-820a-5ce322f36793","html_url":"https://github.com/NonProjects/tgbox","commit_stats":{"total_commits":327,"total_committers":3,"mean_commits":109.0,"dds":"0.45871559633027525","last_synced_commit":"39328697fb72a0b62f214d2d315852b34bb16c57"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NonProjects%2Ftgbox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NonProjects%2Ftgbox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NonProjects%2Ftgbox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NonProjects%2Ftgbox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NonProjects","download_url":"https://codeload.github.com/NonProjects/tgbox/tar.gz/refs/heads/indev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224069597,"owners_count":17250453,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","async","cloud-storage","encrypted-files","python3","telegram"],"created_at":"2024-11-11T07:45:52.255Z","updated_at":"2026-03-13T18:31:12.904Z","avatar_url":"https://github.com/NonProjects.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"TGBOX: encrypted cloud storage based on `Telegram \u003chttps://telegram.org\u003e`__\n===========================================================================\n.. epigraph::\n\n        | ❕ This repository contains a set of classes and functions used to manage TGBOX.\n        |       Try the `tgbox-cli \u003chttps://github.com/NotStatilko/tgbox-cli\u003e`__  if you're interested in working implementation!\n\n.. code-block:: python\n\n        import tgbox, tgbox.api.sync\n\n        # This two will not work. Get your own at https://my.telegram.org\n        API_ID, API_HASH = 1234567, '00000000000000000000000000000000'\n\n        tc = tgbox.api.TelegramClient(api_id=API_ID, api_hash=API_HASH)\n        tc.start() # This method will prompt you for Phone, Code \u0026 Password\n\n        print(phrase := tgbox.keys.Phrase.generate()) # Your secret Box Phrase\n        basekey = tgbox.keys.make_basekey(phrase) # Will Require 1GB of RAM\n        box = tgbox.api.make_box(tc, basekey) # Will make Encrypted File Storage\n\n        # Will upload selected file to the RemoteBox, cache information\n        # in LocalBox and return the tgbox.api.abstract.BoxFile object\n        abbf = box.push(input('File to upload (path): '))\n\n        # Retrieving some info from the BoxFile\n        print('File size:', abbf.size, 'bytes')\n        print('File name:', abbf.file_name)\n\n        downloaded = abbf.download() # Downloading your file from Remote.\n        print(downloaded) # Will print path to downloaded file object\n\n        box.done() # Work is done. Close all connections!\n\n.. epigraph::\n\n        | ❔ This code block heavily utilize the magic ``tgbox.api.sync`` module and high-level functions\n        |       from the ``tgbox.api.abstract`` module for showcase. For actual *Async* code, see `Examples \u003chttps://tgbox.readthedocs.io/en/latest/examples.html\u003e`__.\n\nMotivation\n----------\n\nAlthough **Telegram** started as security-oriented Messenger, in recent years developers shifted its focus from privacy enhancements to social-network features \u0026 cryptocurrency integration. You may like or dislike that, but fact is obvious — Telegram can expand on its privacy-focused roots and add some more cool things — like *Encrypted Cloud Storage*. While core developers are busy with their \"`gifts \u003chttps://telegram.org/blog/wear-gifts-blockchain-and-more\u003e`__\", we may make something on our own by utilizing `Telegram Client API \u003chttps://core.telegram.org\u003e`__, and here is my vision on it.\n\nTarget\n------\n\nThis **unofficial, and not affiliated with Telegram** library targets to be a Proof of *Concept* of the *Encrypted Cloud Storage* inside the Telegram Messenger. You **can not** use it directly inside your Telegram App (like Desktop or Android client). It's a standalone Python library for developers and alike.\n\nAbstract\n--------\n\nIn the scope of this project we name *\"encrypted cloud storage\"* as **Box** and the API to it as ``tgbox``. The *Box* consists of two parts: the **RemoteBox** (place where we store your *encrypted files*) and the **LocalBox** (place where we store *cache information*). They define a basic primitives. You can **share** your *Box* and separate *Files* with other users absolutely **secure** (even through insecure communication canals — `e2e \u003chttps://en.wikipedia.org/wiki/End-to-end_encryption\u003e`__) — only You and *Requester* will have decryption key. You can create an **unlimited** amount of *Box* objects, Upload \u0026 Download speed is **faster** than in official Telegram clients and maximum file size is around **2GB** for Regular users and around **4GB** for Premium ones.\n\nDocumentation\n-------------\n\nSee `ReadTheDocs \u003chttps://tgbox.readthedocs.io/\u003e`__ for main information and help.\n\nYou can also build Documentation from the source\n\n.. code-block:: console\n\n   git clone https://github.com/NonProject/tgbox --branch=indev\n   cd tgbox \u0026\u0026 python3 -m pip install .[doc] # Install with doc\n   cd docs \u0026\u0026 make html \u0026\u0026 firefox _build/html/index.html\n\nThird party \u0026 thanks to\n-----------------------\n- `⭐️ \u003chttps://github.com/NonProjects/tgbox/stargazers\u003e`__ **Stargazers!**\n- `Sphinx_book_theme \u003chttps://github.com/executablebooks/sphinx-book-theme\u003e`__ (`BSD 3-Clause \u003chttps://github.com/executablebooks/sphinx-book-theme/blob/master/LICENSE\u003e`__)\n- `Aiosqlite \u003chttps://github.com/omnilib/aiosqlite\u003e`__ (`MIT \u003chttps://github.com/omnilib/aiosqlite/blob/main/LICENSE\u003e`__)\n- `Telethon \u003chttps://github.com/LonamiWebs/Telethon\u003e`__ (`MIT \u003chttps://github.com/LonamiWebs/Telethon/blob/master/LICENSE\u003e`__)\n- `Ecdsa \u003chttps://github.com/tlsfuzzer/python-ecdsa\u003e`__ (`LICENSE \u003chttps://github.com/tlsfuzzer/python-ecdsa/blob/master/LICENSE\u003e`__)\n- `Filetype \u003chttps://github.com/h2non/filetype.py\u003e`__ (`MIT \u003chttps://github.com/h2non/filetype.py/blob/master/LICENSE\u003e`__)\n- `Cryptg \u003chttps://github.com/cher-nov/cryptg\u003e`__ (`LICENSE \u003chttps://github.com/cher-nov/cryptg/blob/master/LICENSE.txt\u003e`__)\n- `Cryptography \u003chttps://github.com/pyca/cryptography\u003e`__ (`LICENSE \u003chttps://github.com/pyca/cryptography/blob/main/LICENSE\u003e`__)\n- `Uvloop \u003chttps://github.com/MagicStack/uvloop\u003e`__ (`MIT \u003chttps://github.com/MagicStack/uvloop/blob/master/LICENSE-MIT\u003e`__)\n\nResources\n---------\n- Official **developer channel**: `@nontgbox \u003chttps://telegram.me/nontgbox\u003e`__\n- **Example** TGBOX **container**: `@nontgbox_non \u003chttps://telegram.me/nontgbox_non\u003e`__\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonprojects%2Ftgbox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnonprojects%2Ftgbox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnonprojects%2Ftgbox/lists"}