Skip to main content

Limit time and memory usage from a function

Project description

Limit time and memory usage of a Python function


pip install flimit


from flimit.memory import limit_memory
from flimit.time import limit_time

def f(...):  # f will have a limit of 1 Go allocation memory and 60 seconds computation time


python -m pytest tests

Project details

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)

Uploaded source

Built Distribution

flimit-1.0.0-py3-none-any.whl (2.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page