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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flimit-1.0.0.tar.gz.
File metadata
- Download URL: flimit-1.0.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-27-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f6da7f2247f364ee57fc5a0de2ea79203d0c60ef9fba8cb074fef3eacce1064
|
|
| MD5 |
f82a786450081f308d398a078409cc73
|
|
| BLAKE2b-256 |
71b00e93bf4725134c589416c6bd63af17ca4e043fd3bc042ffc06ad27e9d2a7
|
File details
Details for the file flimit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: flimit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-27-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bd875d6d836930aae2efd77a75bba9070d7bb6dd32113d77a6ad6ffd8d5b7e0
|
|
| MD5 |
6f797d18b6755ae093db60982645212a
|
|
| BLAKE2b-256 |
32d56e1bfd7ea99b9a24e62ee7b00b1ec7bf9a6ab2f762e2c8fb3896ea226194
|