{"id":30104174,"url":"https://github.com/zj3an/openfiles-async","last_synced_at":"2025-08-09T22:30:42.788Z","repository":{"id":308049245,"uuid":"1031451089","full_name":"zJ3an/openfiles-async","owner":"zJ3an","description":"An asynchronous version of the Python SDK for interacting with the Openfiles API","archived":false,"fork":false,"pushed_at":"2025-08-03T19:45:24.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-03T21:25:32.098Z","etag":null,"topics":["opefiles-async","openfiles-python"],"latest_commit_sha":null,"homepage":"https://zj3an.vercel.app/donate.html","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zJ3an.png","metadata":{"files":{"readme":"README.md","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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T19:07:38.000Z","updated_at":"2025-08-03T19:47:18.000Z","dependencies_parsed_at":"2025-08-03T21:25:35.351Z","dependency_job_id":"d5339bd6-44dc-4562-ad6f-520aebe1ad49","html_url":"https://github.com/zJ3an/openfiles-async","commit_stats":null,"previous_names":["zj3an/openfiles-async"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zJ3an/openfiles-async","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zJ3an%2Fopenfiles-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zJ3an%2Fopenfiles-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zJ3an%2Fopenfiles-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zJ3an%2Fopenfiles-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zJ3an","download_url":"https://codeload.github.com/zJ3an/openfiles-async/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zJ3an%2Fopenfiles-async/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269649170,"owners_count":24453498,"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","status":"online","status_checked_at":"2025-08-09T02:00:10.424Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["opefiles-async","openfiles-python"],"created_at":"2025-08-09T22:30:41.960Z","updated_at":"2025-08-09T22:30:42.776Z","avatar_url":"https://github.com/zJ3an.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# OpenFiles Async\n\nAn asynchronous version of the Python SDK for interacting with the Openfiles API\n\n[![Support Me](https://img.shields.io/badge/Support%20Me-Donate-yellow?style=for-the-badge)](https://zj3an.vercel.app/donate.html)\n\n\u003c/div\u003e\n\n## Usage\n\n```python\nimport asyncio\nfrom openfiles_async import AsyncOpenfilesClient\n\nasync def main():\n    # Initialize the client\n    async with AsyncOpenfilesClient(api_token=\"your_api_token\") as client:\n        \n        # Get user information\n        user_info = await client.get_user_info()\n        print(f\"User ID: {user_info.uid}\")\n        print(f\"Space left: {user_info.space_left} / {user_info.capacity}\")\n        \n        # List user files\n        files = await client.get_user_files_list()\n        print(f\"Total files: {len(files)}\")\n        for file in files:\n            print(f\"File: {file.filename}, Size: {file.size}, Bag ID: {file.bag_id}\")\n        \n        # Upload a file\n        response = await client.upload_file(\n            file_path=\"test/file.txt\", \n            description=\"My file description\"\n        )\n        file_bag_id = response.bag_id\n        print(f\"File uploaded with bag_id: {file_bag_id}\")\n        \n        # Upload a folder (as ZIP)\n        folder_response = await client.upload_folder(\n            folder_path=\"test/folder\", \n            description=\"My folder description\"\n        )\n        print(f\"Folder uploaded with bag_id: {folder_response.bag_id}\")\n        \n        # Download a file\n        downloaded_path = await client.download_file(\n            bag_id=file_bag_id, \n            destination=\"test/downloaded_file.txt\"\n        )\n        print(f\"File downloaded to: {downloaded_path}\")\n        \n        # Add file by bag ID\n        await client.add_by_bag_id(bag_id=file_bag_id)\n        print(\"File added by bag ID\")\n        \n        # Delete a file\n        await client.delete_file(bag_id=file_bag_id)\n        print(\"File deleted\")\n        \n        # Concurrent operations (run multiple operations at the same time)\n        user_info, files_list = await asyncio.gather(\n            client.get_user_info(),\n            client.get_user_files_list()\n        )\n        print(\"Multiple operations completed simultaneously!\")\n\n# Run the example\nasyncio.run(main())\n```\n\n## Features\n\n- 📋 **List account files** - Get all files in your account\n- 📤 **Upload files** - Upload individual files to TON storage\n- 📁 **Upload folders** - Upload entire folders as ZIP files\n- 📥 **Download files** - Download files by bag ID\n- 🗑️ **Delete files** - Remove files from storage\n- 👤 **Get user info** - Access account information and storage limits\n- 🔗 **Add by bag ID** - Add existing files by their bag ID\n- ⚡ **Concurrent operations** - Run multiple operations simultaneously\n- 🔄 **Async/await support** - Fully asynchronous operations\n- 🎯 **Context manager** - Automatic session management\n\n## Requirements\n\n- Python 3.8+\n- aiohttp \u003e= 3.8.0\n- aiofiles \u003e= 22.1.0  \n- pydantic \u003e= 1.10.0\n\n## Installation\n\n```bash\npip install aiohttp aiofiles pydantic\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzj3an%2Fopenfiles-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzj3an%2Fopenfiles-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzj3an%2Fopenfiles-async/lists"}