
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).
redis-semaphore-async
Advanced tools
Redis Semaphore Async is a Python library that provides an asynchronous semaphore implementation using Redis as the backend.
Redis-Semaphore-Async is a Python library that provides an asynchronous semaphore implementation using Redis as the backend. It allows you to manage concurrent access to resources in a distributed environment.
To install Redis-Semaphore-Async, you can use pip:
pip install redis-semaphore-async
Here is an example of how to use Redis-Semaphore-Async:
import asyncio
from redis.asyncio import Redis
from redis_semaphore_async import Semaphore
async def main():
redis = Redis(host='localhost', port=6379, decode_responses=True)
async with Semaphore(redis=redis, task_name="test_semaphore", value=5):
# Your code here
pass
# or
semaphore = Semaphore(redis=redis, task_name="test_semaphore", value=5)
with semaphore:
# Your code here
pass
# or
semaphore = Semaphore(redis=redis, task_name="test_semaphore", value=5)
await semaphore.acquire()
# Your code here
await semaphore.release()
if __name__ == "__main__":
asyncio.run(main())
We welcome contributions! Please read our contributing guidelines for more information.
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
Redis Semaphore Async is a Python library that provides an asynchronous semaphore implementation using Redis as the backend.
We found that redis-semaphore-async 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.