A simple and elegant client that allows you to make group voice calls quickly and easily.
Examples
•
Documentation
•
PyPi
•
Channel
•
Chat
PyTgCalls

This project allows making Telegram call using MtProto and WebRTC, this is possible thanks to the power of NTgCalls library and @evgeny-nadymov
Example Usage
from pytgcalls import PyTgCalls
from pytgcalls import idle
...
chat_id = -1001185324811
app = PyTgCalls(client)
app.start()
app.play(
chat_id,
'http://docs.evostream.com/sample_content/assets/sintel1m720p.mp4',
)
idle()
Features
- Prebuilt wheels for macOS, Linux and Windows.
- Supporting all type of MTProto libraries: Pyrogram, Telethon and Hydrogram.
- Work with voice chats in channels and chats.
- Join as channels or chats.
- Mute/unmute, pause/resume, stop/play, volume control and more...
- 🆕 Advanced Memory Management: Automatic memory leak prevention and monitoring
- 🆕 Cache Optimization: Intelligent cache cleanup and management
- 🆕 Resource Cleanup: Proper shutdown and resource management
Memory Management Features
PyTgCalls now includes advanced memory management to prevent memory leaks:
# Initialize with memory management
call_py = PyTgCalls(
app,
enable_memory_manager=True, # Enable automatic memory management
memory_cleanup_interval=300, # Cleanup every 5 minutes
cache_duration=3600, # Cache duration 1 hour
)
# Monitor memory usage
stats = call_py.get_memory_stats()
print(f"Memory Usage: {stats['usage']['rss_mb']:.1f} MB")
# Force cleanup
await call_py.force_cleanup()
# Proper shutdown
await call_py.shutdown()
For detailed memory management documentation, see MEMORY_MANAGEMENT.md.
Requirements
- Python 3.9 or higher.
- An MTProto Client
- A Telegram API key.
- Optional:
psutilfor memory monitoring features
How to install?
Here's how to install the PyTgCalls lib, the commands are given below:
# With Git
pip install git+https://github.com/pytgcalls/pytgcalls -U
# With PyPi (Recommended)
pip install anthraleia-pytgcalls -U
# With memory monitoring features
pip install "anthraleia-pytgcalls[memory-monitoring]" -U
Key Contributors
- @Laky-64 (DevOps Engineer, Software Architect):
- Played a crucial role in developing PyTgCalls being an ex developer of pyservercall and of tgcallsjs.
- Automation with GitHub Actions
- @kuogi (Senior UI/UX designer, Documenter):
- As a Senior UI/UX Designer, Kuogi has significantly improved the user interface of our documentation, making it more visually appealing and user-friendly.
- Played a key role in writing and structuring our documentation, ensuring that it is clear, informative, and accessible to all users.
- @vrumger (Senior Node.js Developer, Software Architect):
- Has made important fixes and enhancements to the WebRTC component of the library, improving its stability and performance.
- Main developer of TgCallsJS
- @alemidev (Senior Python Developer):
- Has made important fixes and enhancements to the async part of the library
Junior Developers
- @TuriOG (Junior Python Developer):
- Currently working on integrating NTgCalls into PyTgCalls, an important step in expanding the functionality and usability of the library.
Special Thanks
- @evgeny-nadymov: A heartfelt thank you to Evgeny Nadymov for graciously allowing us to use their code from telegram-react. His contribution has been pivotal to the success of this project.
Metadata
Release files for anthraleia-pytgcalls 1.0.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anthraleia_pytgcalls-1.0.11.tar.gz | 54.7 kB | Without provenance | Details for anthraleia_pytgcalls-1.0.11.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anthraleia_pytgcalls-1.0.11-py3-none-any.whl | Python 3 | none | any | Details for anthraleia_pytgcalls-1.0.11-py3-none-any.whl |
Total release size: 144.1 kB
Release files / anthraleia_pytgcalls-1.0.11.tar.gz
| Download URL | anthraleia_pytgcalls-1.0.11.tar.gz |
|---|---|
| Size | 54.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
366a9bda8885f3b8e7bbf0f45ce7989ff3e0c2073ff766fe007d0144fb5815f8
|
|
BLAKE2b-256 checksum How to use checksums |
93068b99261f974d3eb7273baf35accfa5bd26c7273532cbd75c214cdfb0d6ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / anthraleia_pytgcalls-1.0.11-py3-none-any.whl
| Download URL | anthraleia_pytgcalls-1.0.11-py3-none-any.whl |
|---|---|
| Size | 89.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49961392d5b5e2c96d4bf25777ebcf16a0dac667ae8e55b9cc8a5f426b913218
|
|
BLAKE2b-256 checksum How to use checksums |
224a9670449bcdb3f447e60306bb3c271d013dd71281362f66a5fac4a9a7dcf3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for anthraleia-pytgcalls 1.0.11
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.