This release is a pre-release and may not be stable for production use.
Simple Resource Limite Decorators For Python Runtime
Decorators:
@set_runtime(seconds=0)
RuntimeError, max runtime of the function in decorators
@set_cpu_runtime(seconds=0)
RuntimeError, max soft cpu runtime of the function in decorators
@set_max_memory(size=0)
max memory of the function in decorators
@set_max_cpu(nproc=65535)
max memory of the function in decorators
set_max_cpu0(nproc=65535)
max ncpu of the function in main process, can not be used for decorators
Usage:
@set_runtime(seconds=5)
def test():
time.sleep(10)
test()
## RuntimeError
Install
pip install simpleresource
or:
pip install git+https://github.com/yodeng/simpleresource.git
Metadata
Release files for simpleresource 1.0.0b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simpleresource-1.0.0b0-py2-none-any.whl | Python 2 | none | any | Details for simpleresource-1.0.0b0-py2-none-any.whl |
Release files / simpleresource-1.0.0b0-py2-none-any.whl
| Download URL | simpleresource-1.0.0b0-py2-none-any.whl |
|---|---|
| Size | 2.6 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
bea7abb99b326089b1eacd2c1c7cea429e024c3b545b41a07ef9feef37fa1e11
|
|
BLAKE2b-256 checksum How to use checksums |
6b4d70d32bac3d8147cc7643a6f882d0830c2fd2722b9e79763d52ddbe386ebc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.7.0 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/2.7.16
|
Security for simpleresource 1.0.0b0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.