Limit time and memory usage from a function
Project description
Limit time and memory usage of a Python function
Installation
pip install flimit
Usage
from flimit.memory import limit_memory
from flimit.time import limit_time
@limit_memory(10**9)
@limit_time(60)
def f(...): # f will have a limit of 1 Go allocation memory and 60 seconds computation time
...
Tests
python -m pytest tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flimit-1.0.0.tar.gz
(1.9 kB
view hashes)
Built Distribution
flimit-1.0.0-py3-none-any.whl
(2.1 kB
view hashes)