Skip to main content

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

Metadata

Release files for flimit 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flimit 1.0.0
File Size Uploaded Provenance Actions
flimit-1.0.0.tar.gz 1.9 kB Without provenance Details for flimit-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flimit 1.0.0
File Interpreter ABI Platform Actions
flimit-1.0.0-py3-none-any.whl Python 3 none any Details for flimit-1.0.0-py3-none-any.whl

Total release size: 4.1 kB

Release files / flimit-1.0.0.tar.gz

Download URL flimit-1.0.0.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
7f6da7f2247f364ee57fc5a0de2ea79203d0c60ef9fba8cb074fef3eacce1064
BLAKE2b-256 checksum
How to use checksums
71b00e93bf4725134c589416c6bd63af17ca4e043fd3bc042ffc06ad27e9d2a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-27-generic

Release files / flimit-1.0.0-py3-none-any.whl

Download URL flimit-1.0.0-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8bd875d6d836930aae2efd77a75bba9070d7bb6dd32113d77a6ad6ffd8d5b7e0
BLAKE2b-256 checksum
How to use checksums
32d56e1bfd7ea99b9a24e62ee7b00b1ec7bf9a6ab2f762e2c8fb3896ea226194
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.6 CPython/3.9.1 Linux/5.11.0-27-generic

Security for flimit 1.0.0

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.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page