{"id":13448127,"url":"https://github.com/ParthS007/background","last_synced_at":"2025-03-22T02:30:43.542Z","repository":{"id":54758945,"uuid":"102224878","full_name":"ParthS007/background","owner":"ParthS007","description":"Runs things in the background. ","archived":false,"fork":false,"pushed_at":"2023-04-08T18:19:38.000Z","size":23,"stargazers_count":513,"open_issues_count":2,"forks_count":24,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-03-14T17:05:35.678Z","etag":null,"topics":["background","background-jobs","jobs","python","tasks"],"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/ParthS007.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"ParthS007"}},"created_at":"2017-09-02T21:38:01.000Z","updated_at":"2025-01-15T20:49:30.000Z","dependencies_parsed_at":"2024-10-26T21:14:11.940Z","dependency_job_id":"96ef4e6e-62af-497c-90b4-4acb550a6148","html_url":"https://github.com/ParthS007/background","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthS007%2Fbackground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthS007%2Fbackground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthS007%2Fbackground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ParthS007%2Fbackground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ParthS007","download_url":"https://codeload.github.com/ParthS007/background/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244897663,"owners_count":20528275,"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":["background","background-jobs","jobs","python","tasks"],"created_at":"2024-07-31T05:01:36.444Z","updated_at":"2025-03-22T02:30:43.231Z","avatar_url":"https://github.com/ParthS007.png","language":"Python","readme":".. image:: https://img.shields.io/pypi/pyversions/background.svg\n   :target: https://pypi.org/pypi/background\n\n.. image:: https://github.com/ParthS007/background/workflows/CI/badge.svg\n   :target: https://github.com/ParthS007/background/actions\n\nBackground\n=======================================\n\nIt runs stuff in the background.\n\n    \"An elegant decorator-based abstraction around Python 3's concurrent.futures ThreadPoolExecutor class\" \n\n    — Simon Willison\n\nThis module makes it stupidly simple to run things in the background of your\napplication, be it a CLI app, or a web app.\n\nBasic Usage\n-----------\n\n.. code:: python\n\n\n    import time\n\n    import background\n\n\n    @background.task\n    def work():\n        # Do something expensive here.\n        time.sleep(10)\n\n\n    for _ in range(100):\n        work()\n\n\nAdvanced Usage\n--------------\n\n.. code:: python\n\n    import time\n\n    import background\n\n    # Use 40 background threads.\n    background.n = 40\n    \n\n    @background.task\n    def work():\n        time.sleep(10)\n        return \"Done!\"\n\n    @background.callback\n    def work_callback(future):\n        print(future.result())\n\n\n    for _ in range(100):\n        work()\n\nInstallation\n------------\n\n::\n\n    $ pipenv install background\n    ✨🍰✨\n","funding_links":["https://github.com/sponsors/ParthS007"],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParthS007%2Fbackground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FParthS007%2Fbackground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FParthS007%2Fbackground/lists"}