{"id":21855882,"url":"https://github.com/t3tra-dev/mtaio","last_synced_at":"2026-01-31T20:02:10.332Z","repository":{"id":264400494,"uuid":"893271157","full_name":"t3tra-dev/mtaio","owner":"t3tra-dev","description":"A comprehensive framework for asynchronous I/O operations and utilities.","archived":false,"fork":false,"pushed_at":"2024-11-26T04:48:23.000Z","size":1498,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-28T19:37:20.211Z","etag":null,"topics":["async","async-await","asynchronous","asyncio","multithreading","python","python3","thread-pool","threading","threadpool"],"latest_commit_sha":null,"homepage":"https://t3tra-dev.github.io/mtaio/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t3tra-dev.png","metadata":{"files":{"readme":"README.ja.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.ja.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.ja.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-24T01:23:01.000Z","updated_at":"2025-07-26T14:10:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"c635a454-24d6-4603-8769-131a5a6ad311","html_url":"https://github.com/t3tra-dev/mtaio","commit_stats":null,"previous_names":["t3tra-dev/mtaio"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/t3tra-dev/mtaio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fmtaio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fmtaio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fmtaio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fmtaio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t3tra-dev","download_url":"https://codeload.github.com/t3tra-dev/mtaio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3tra-dev%2Fmtaio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28952578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["async","async-await","asynchronous","asyncio","multithreading","python","python3","thread-pool","threading","threadpool"],"created_at":"2024-11-28T02:19:49.043Z","updated_at":"2026-01-31T20:02:10.326Z","avatar_url":"https://github.com/t3tra-dev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[[英語/English](README.md)]\n\n# `mtaio` - Multi-threaded Async I/O Framework\n\n#### !! `Python3.11+で動作します` !!\n\n`mtaio`は効率的な並行アプリケーションを構築するための高レベルな抽象化を提供する、包括的な非同期I/Oフレームワークです。\n\n## 特徴\n\n- **非同期コア**\n  - 並行性制御付きタスク実行\n  - 柔軟なキュー実装(優先度、LIFO)\n  - ラッチ同期プリミティブ\n\n- **キャッシュ**\n  - 複数の退避ポリシー(LRU, LFU, FIFO)を持つTTLベースのキャッシュ\n  - ノードレプリケーション付き分散キャッシュ\n  - 自動キャッシュクリーンアップと監視\n\n- **データ処理**\n  - リアクティブデータ処理のためのObservableパターン\n  - カスタマイズ可能なステージを持つパイプライン処理\n  - ストリーム処理とオペレータ\n\n- **イベント処理**\n  - 優先度サポート付き非同期イベントエミッタ\n  - チャネルベースの通信\n  - Pub/subパターン実装\n\n- **プロトコルサポート**\n  - ASGIアプリケーションフレームワーク\n  - MQTTクライアント実装\n  - 非同期IMAPとSMTPクライアント\n\n- **リソース管理**\n  - トークンバケットアルゴリズムによるレート制限\n  - 並行性制限\n  - タイムアウト管理\n  - リソース監視\n\n## インストール\n\n```bash\npip install mtaio\n```\n\n## クイックスタート\n\n以下は、主要な機能を示す簡単な例です:\n\n```python\nfrom mtaio.core import TaskExecutor, RateLimiter, TimeoutManager\n\nasync def main():\n    # レート制限付きタスク実行器を作成\n    executor = TaskExecutor()\n    limiter = RateLimiter(rate=10.0)  # 1秒あたり10操作\n\n    @limiter.limit\n    async def process_item(item):\n        # タイムアウト付きで処理\n        async with TimeoutManager(5.0) as tm:\n            result = await tm.run(some_operation(item))\n            return result\n\n    # 複数のアイテムを並行して処理\n    items = range(100)\n    results = await executor.map(process_item, items, limit=5)\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n## ドキュメント\n\n### コアコンポーネント\n\n#### `TaskExecutor`\n\n`TaskExecutor`は並行性制御付きのコルーチン実行メソッドを提供します:\n\n```python\nfrom mtaio.core import TaskExecutor\n\nasync def example():\n    executor = TaskExecutor()\n    \n    # 並行性制限付きで複数のコルーチンを実行\n    results = await executor.gather(\n        coro1(),\n        coro2(),\n        limit=5\n    )\n```\n\n#### キャッシュ\n\n`mtaio`は柔軟なキャッシュソリューションを提供します:\n\n```python\nfrom mtaio.cache import TTLCache, DistributedCache\n\nasync def cache_example():\n    # シンプルなTTLキャッシュ\n    cache = TTLCache[str](\n        default_ttl=60.0,\n        max_size=1000\n    )s\n    \n    # 分散キャッシュ\n    dist_cache = DistributedCache[str](\n        nodes=[\n            ('localhost', 5000),\n            ('localhost', 5001)\n        ]\n    )\n```\n\n#### イベント処理\n\nイベントシステムは優先度付きイベント処理をサポートします:\n\n```python\nfrom mtaio.events import EventEmitter\n\nasync def event_example():\n    emitter = EventEmitter()\n\n    @emitter.on(\"user_login\")\n    async def handle_login(event):\n        user = event.data\n        print(f\"ユーザー {user.name} がログインしました\")\n\n    await emitter.emit(\"user_login\", user_data)\n```\n\n### 高度な機能\n\n#### リソース管理\n\nレート制限とタイムアウトでリソース使用を制御します:\n\n```python\nfrom mtaio.resources import ResourceLimiter\n\nasync def resource_example():\n    limiter = ResourceLimiter(\n        rate=10.0,      # 1秒あたり10リクエスト\n        concurrency=5   # 最大5同時実行\n    )\n\n    @limiter.limit\n    async def limited_operation():\n        await process_request()\n```\n\n#### モニタリング\n\nシステムリソースとアプリケーションパフォーマンスを監視します:\n\n```python\nfrom mtaio.monitoring import ResourceMonitor\n\nasync def monitor_example():\n    monitor = ResourceMonitor()\n\n    @monitor.on_threshold_exceeded\n    async def handle_alert(metric, value, threshold):\n        print(f\"アラート: {metric} がしきい値を超えました\")\n\n    await monitor.start()\n```\n\n## 貢献\n\n`mtaio`への貢献は大歓迎です！以下の手順に従って貢献できます:\n\n1. リポジトリをフォークします: [github.com/t3tra-dev/mtaio](https://github.com/t3tra-dev/mtaio)\n2. フィーチャーブランチを作成します: `git checkout -b feat/your-feature`\n3. 変更をコミットします: `git commit -m 'Add a new feature'`\n4. ブランチをプッシュします: `git push origin feat/your-feature`\n5. プルリクエストを送信します。\n\nサポートや質問については、リポジトリの[Issuesセクション](https://github.com/t3tra-dev/mtaio/issues)に問題を報告してください。\n\n## ライセンス\n\nこのプロジェクトはMITライセンスの下で提供されています - 詳細は[LICENSE](LICENSE)ファイルをご覧ください。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3tra-dev%2Fmtaio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft3tra-dev%2Fmtaio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3tra-dev%2Fmtaio/lists"}