{"id":16881545,"url":"https://github.com/benbjohnson/slowweb","last_synced_at":"2025-07-18T10:34:33.298Z","repository":{"id":1353005,"uuid":"1300364","full_name":"benbjohnson/slowweb","owner":"benbjohnson","description":"An HTTP request governor","archived":false,"fork":false,"pushed_at":"2015-04-08T14:15:54.000Z","size":156,"stargazers_count":74,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-10T06:20:03.177Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/benbjohnson.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-27T20:21:34.000Z","updated_at":"2023-12-27T02:51:52.000Z","dependencies_parsed_at":"2022-07-07T03:02:44.978Z","dependency_job_id":null,"html_url":"https://github.com/benbjohnson/slowweb","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/benbjohnson/slowweb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fslowweb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fslowweb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fslowweb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fslowweb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/benbjohnson","download_url":"https://codeload.github.com/benbjohnson/slowweb/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/benbjohnson%2Fslowweb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265742793,"owners_count":23820912,"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":[],"created_at":"2024-10-13T16:03:27.816Z","updated_at":"2025-07-18T10:34:33.259Z","avatar_url":"https://github.com/benbjohnson.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Slow Web - An HTTP Request Governor\n===================================\n\n## DESCRIPTION\n\nSlow Web is a way to limit the number of requests to a domain within a certain\nperiod of time. It is inspired by Chris Kampmeier's\n[FakeWeb](https://github.com/chrisk/fakeweb).\n\nFor example, the GitHub API only allows for 60 requests per minute. Slow Web can\nmonitor the number of calls to that domain and will sleep on the next request\nthat is over the limit.\n\nSlow Web follows the rules of [Semantic Versioning](http://semver.org/).\n\n\n## RUNNING\n\nTo install Slow Web, simply install the gem:\n\n\t$ [sudo] gem install slowweb\n\nAnd specify the domain to limit.\n\n\trequire 'slowweb'\n\tSlowWeb.limit('example.com', 10, 60)\n\nThis restricts the `example.com` domain to only allowing `10` requests every\n`60` seconds.\n\n\n## EXAMPLE\n\nBecause SlowWeb attaches to the low-level Net::HTTP class, all API gems should\nwork. For example, you can use the [Octopi](https://github.com/fcoury/octopi)\nAPI to access GitHub information and use SlowWeb to restrict calls\nautomatically.\n\n\trequire 'slowweb'\n\tSlowWeb.limit('github.com', 60, 60)  # 60 requests per minute\n\t\n\t# Use up all the API requests for this minute\n\t60.times do |i|\n\t  tpw = Octopi::User.find('mojombo')\n\tend\n\t\n\t# This request will wait until a minute after the first request was sent\n\twanstrath = Octopi::User.find('defunkt')\n\nThis code will retrieve user information on\n[Tom Preston-Warner (mojombo)](https://github.com/mojombo) sixty times and then\nattempts to access user information for\n[Chris Wanstrath (defunkt)](https://github.com/defunkt). However when the API\ncall is made to view `defunkt`, SlowWeb will cause your application sleep until\na minute has passed since your first request to mojombo.\n\n\n## CONTRIBUTE\n\nIf you'd like to contribute to SlowWeb, start by forking the repository\non GitHub:\n\nhttp://github.com/benbjohnson/slowweb\n\nThen follow these steps to send your changes:\n\n1. Clone down your fork\n1. Create a topic branch to contain your change\n1. Code\n1. All code must have MiniTest::Unit test coverage.\n1. If you are adding new functionality, document it in the README\n1. If necessary, rebase your commits into logical chunks, without errors\n1. Push the branch up to GitHub\n1. Send me a pull request for your branch","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Fslowweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbenbjohnson%2Fslowweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbenbjohnson%2Fslowweb/lists"}