timeoutcall


Nametimeoutcall JSON
Version 1.0rc2 PyPI version JSON
download
home_pagehttps://github.com/xyzpw/timeoutcall/
SummaryA package designed to kill a function after a specified amount of time.
upload_time2024-03-30 14:27:30
maintainerxyzpw
docs_urlNone
authorxyzpw
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # timeoutcall
A package designed to kill a function after a specified amount of time.

## Usage
Killing a function after a specified amount of time:
```python
from timeoutcall import timeout
from time import sleep

@timeout(2, "error: took too long")
def foo():
    sleep(3) # will raise TimeoutError

foo()
```
Running a test/preview:
```bash
$ python3 -m timeoutcall.test
```

## Developers
### Build and Source Distributions
To build the wheel and source distributions, cd into the repositories root directory and run the following command:
```bash
python3 -m build
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/xyzpw/timeoutcall/",
    "name": "timeoutcall",
    "maintainer": "xyzpw",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "xyzpw",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/e5/7d/1a435726977a1afc696b8fbb94844b3385da011d515dbff3a5e211cad360/timeoutcall-1.0rc2.tar.gz",
    "platform": null,
    "description": "# timeoutcall\nA package designed to kill a function after a specified amount of time.\n\n## Usage\nKilling a function after a specified amount of time:\n```python\nfrom timeoutcall import timeout\nfrom time import sleep\n\n@timeout(2, \"error: took too long\")\ndef foo():\n    sleep(3) # will raise TimeoutError\n\nfoo()\n```\nRunning a test/preview:\n```bash\n$ python3 -m timeoutcall.test\n```\n\n## Developers\n### Build and Source Distributions\nTo build the wheel and source distributions, cd into the repositories root directory and run the following command:\n```bash\npython3 -m build\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A package designed to kill a function after a specified amount of time.",
    "version": "1.0rc2",
    "project_urls": {
        "Homepage": "https://github.com/xyzpw/timeoutcall/"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4d28206b61966cbb589e870b3e155fdf33cfd4b3d720279a6b6a09a916d93952",
                "md5": "b7cbe2e0b852b2784c8428d2f1b701b6",
                "sha256": "eb11127e4b5a4d45d2ce16c68e54e243a0f4646f96bc95d0a2f2d64d5a107106"
            },
            "downloads": -1,
            "filename": "timeoutcall-1.0rc2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b7cbe2e0b852b2784c8428d2f1b701b6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 2609,
            "upload_time": "2024-03-30T14:27:28",
            "upload_time_iso_8601": "2024-03-30T14:27:28.403011Z",
            "url": "https://files.pythonhosted.org/packages/4d/28/206b61966cbb589e870b3e155fdf33cfd4b3d720279a6b6a09a916d93952/timeoutcall-1.0rc2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e57d1a435726977a1afc696b8fbb94844b3385da011d515dbff3a5e211cad360",
                "md5": "64d0983f59759b09647ec014f0b526a7",
                "sha256": "04796beded7740d0c79aac636c8e30b7384b3135c1169b8b2d5ac4ccea8c9b51"
            },
            "downloads": -1,
            "filename": "timeoutcall-1.0rc2.tar.gz",
            "has_sig": false,
            "md5_digest": "64d0983f59759b09647ec014f0b526a7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 2180,
            "upload_time": "2024-03-30T14:27:30",
            "upload_time_iso_8601": "2024-03-30T14:27:30.252041Z",
            "url": "https://files.pythonhosted.org/packages/e5/7d/1a435726977a1afc696b8fbb94844b3385da011d515dbff3a5e211cad360/timeoutcall-1.0rc2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-30 14:27:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "xyzpw",
    "github_project": "timeoutcall",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "timeoutcall"
}
        
Elapsed time: 0.92925s