
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
.. image:: https://raw.githubusercontent.com/enricobacis/limit/master/.screenshot/limit.gif :target: https://asciinema.org/a/4f621lbwvpgf91neshex89nrm :align: center
This decorator limits the calling rate of the decorated function. This is useful in conjuction with web API calls, where you often get banned if you perform more calls than the ones specified in the terms of services.
The rate is limit
over every
, where limit is the number of invocation
allowed every every
seconds. limit(4, 60)
creates a decorator that
limits the function calls to 4 per minute. If not specified, every
defaults to 1
second.
.. code:: python
@limit(4, 60)
def function(...):
"""never invoke this function more than 4 times per minute."""
...
The package has been uploaded to PyPI
_, so you can install it with pip:
pip install limit
.. _PyPI: https://pypi.python.org/pypi/limit
FAQs
Decorator that limits the calling rate of a function
We found that limit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.