{"id":15752723,"url":"https://github.com/remram44/python-socket-throttle","last_synced_at":"2026-02-04T15:06:20.695Z","repository":{"id":243161151,"uuid":"811658526","full_name":"remram44/python-socket-throttle","owner":"remram44","description":"Wrapper for sockets letting you limit send/recv bandwidth","archived":false,"fork":false,"pushed_at":"2024-12-17T19:54:56.000Z","size":21,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-04-06T08:16:09.542Z","etag":null,"topics":["bandwidth","limit","socket","throttle"],"latest_commit_sha":null,"homepage":"","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/remram44.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-06-07T03:31:01.000Z","updated_at":"2024-12-17T19:55:02.000Z","dependencies_parsed_at":"2024-06-07T03:48:05.108Z","dependency_job_id":"82309828-dce6-4bbb-a6e7-e841d16e01e4","html_url":"https://github.com/remram44/python-socket-throttle","commit_stats":{"total_commits":20,"total_committers":1,"mean_commits":20.0,"dds":0.0,"last_synced_commit":"0f06845f4b617a12a040fd680aec9d390dd3cb67"},"previous_names":["remram44/python-socket-throttle"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-socket-throttle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-socket-throttle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-socket-throttle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remram44%2Fpython-socket-throttle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remram44","download_url":"https://codeload.github.com/remram44/python-socket-throttle/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249155911,"owners_count":21221678,"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":["bandwidth","limit","socket","throttle"],"created_at":"2024-10-04T07:04:30.418Z","updated_at":"2026-02-04T15:06:20.607Z","avatar_url":"https://github.com/remram44.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Socket throttling for Python\n\nThis tiny library contains a wrapper for sockets that can be used to limit their send and/or receive rate to a specific value.\n\nIt can be used to limit the bandwidth use of any Python code that uses sockets.\n\nExample:\n\n```python\nimport socket\nfrom socket_throttle import LeakyBucket\nfrom socket_throttle.sockets import SocketWrapper\n\n\nsock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0)\nsock.connect(('127.0.0.1', 5000))\n\n# Short syntax, limit sending to 2kB/s and receiving to 100kB/s\nsock = SocketWrapper(sock, send=2_000, recv=100_000)\n\n# Longer syntax, create a bucket that can be shared by multiple sockets\n# Receive speed is unlimited\nsend_bucket = LeakyBucket(100_000, 500_000)\nsock = SocketWrapper(sock, send=send_bucket)\n\n# It works with files too\nfrom socket_throttle.files import FileWrapper\n\nwith open('data.bin', 'rb') as file:\n    file = FileWrapper(file, read=100_000)\n    file.read(...)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremram44%2Fpython-socket-throttle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremram44%2Fpython-socket-throttle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremram44%2Fpython-socket-throttle/lists"}