{"id":21509,"library":"kurigram","title":"Kurigram","description":"An elegant, modern, and asynchronous Telegram MTProto API framework for Python, supporting both user and bot accounts. Current version is 2.2.22, with active development and regular releases.","status":"active","version":"2.2.22","language":"python","source_language":"en","source_url":"https://github.com/KurimuzonAkuma/kurigram","tags":["telegram","mtproto","async","bot","userbot"],"install":[{"cmd":"pip install kurigram","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Kurigram is a fork of Pyrogram; using pyrogram imports will install the wrong library.","wrong":"from pyrogram import Client","symbol":"Client","correct":"from kurigram import Client"},{"note":"Use kurigram.filters, not pyrogram.filters.","wrong":"from pyrogram import filters","symbol":"filters","correct":"from kurigram import filters"}],"quickstart":{"code":"import asyncio\nfrom kurigram import Client\n\nasync def main():\n    app = Client(\"my_account\", api_id=os.environ.get(\"API_ID\", \"\"), api_hash=os.environ.get(\"API_HASH\", \"\"))\n    async with app:\n        await app.send_message(\"me\", \"Hello from Kurigram!\")\n\nasyncio.run(main())","lang":"python","description":"Basic async client that sends a message to 'Saved Messages'."},"warnings":[{"fix":"Uninstall pyrogram if you intend to use kurigram: pip uninstall pyrogram","message":"Kurigram is a fork of Pyrogram with a different package name. Installing kurigram and pyrogram together may cause conflicts.","severity":"breaking","affected_versions":"all"},{"fix":"Use async/await and run with asyncio.run().","message":"Synchronous usage (e.g., Client().send_message without async) is deprecated and may break in future versions.","severity":"deprecated","affected_versions":">=2.0"},{"fix":"Add asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) at the start of your script.","message":"The default event loop on Windows may cause issues with asyncio. Use asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) before running.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install kurigram' in your active Python environment.","cause":"Kurigram is not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'kurigram'"},{"fix":"Obtain valid api_id and api_hash from my.telegram.org/apps and set them as environment variables or pass directly.","cause":"Invalid API ID/Hash or network issues.","error":"Cannot connect to Telegram. Make sure you have a working internet connection."},{"fix":"Use the 'proxy' parameter as a dict: Client('session', proxy=dict(hostname='127.0.0.1', port=8080)).","cause":"Proxy configuration changed in newer versions of Kurigram.","error":"TypeError: Client() got an unexpected keyword argument 'proxy'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}