{"id":23726002,"url":"https://github.com/voidful/bforce","last_synced_at":"2026-02-15T16:30:15.393Z","repository":{"id":185543704,"uuid":"672671084","full_name":"voidful/bforce","owner":"voidful","description":"bruteforce is all you need in a unstable system","archived":false,"fork":false,"pushed_at":"2023-08-06T05:03:29.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-31T00:18:02.588Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/voidful.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}},"created_at":"2023-07-30T21:36:58.000Z","updated_at":"2023-08-08T10:04:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab0e2ace-2b23-4574-b83f-6834fb958bc5","html_url":"https://github.com/voidful/bforce","commit_stats":null,"previous_names":["voidful/bforce"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2Fbforce","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2Fbforce/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2Fbforce/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/voidful%2Fbforce/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/voidful","download_url":"https://codeload.github.com/voidful/bforce/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239824981,"owners_count":19703194,"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-12-31T00:18:07.945Z","updated_at":"2026-02-15T16:30:15.322Z","avatar_url":"https://github.com/voidful.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BForce Library\n\nThe BForce(BruteForce) library is designed to facilitate complex computation that may require retries or caching for efficient execution. The library consists of decorators that can be easily applied to functions to achieve the desired functionality.\n\n## Getting Started\n\n### Prerequisites\n- Python 3.6 or above\n\n### Installation\n\nTo install the library, clone the repository and install it using pip:\n\n```bash\npip install bforce\n```\n\n## Usage\n\nHere are the main features of the library:\n\n### Timeout and Retries\n\nThe `@timeout_retries` decorator allows a function to be retried if it doesn't complete within a specified time limit.\n\n```python\nfrom bforce import timeout_retries\n\n\n@timeout_retries(timeout=2, max_retries=2)\ndef my_function(arg1, arg2):\n# Your code here\n```\n\nIn the example above, if `my_function` does not complete within 2 seconds, it will be retried up to 2 times.\n\n### Caching Results\n\nThe `@cache_result` decorator can be used to cache the result of a function. This is especially useful for time-consuming functions where you want to avoid computing the same result multiple times.\n\n```python\nfrom bforce import cache_result\n\n\n@cache_result(\"my_cache\")\ndef my_function(arg1, arg2):\n# Your code here\n```\n\nIn the above example, the result of `my_function` will be saved in \"my_cache\". If the function is called again with the same arguments, the cached result will be returned instead of running the function again.\n\n### Clearing Cache\n\nYou can clear the cache using the `clear_cache()` function:\n\n```python\nfrom bforce import clear_cache\n\nclear_cache(\"my_cache\")\n```\n\nThis will clear all entries in \"my_cache\".\n\n## Running the Tests\n\nTo run the tests, use the following command:\n\n```bash\npytest\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidful%2Fbforce","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvoidful%2Fbforce","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvoidful%2Fbforce/lists"}