semvec/pypi-packages huggingface dataset:
wipac-dev-actions-testbed 1.1.64
A guinea pig for testing `wipac-dev-*-action` packages and workflows -- using python
Requires Python: <3.15,>=3.12
Keywords: WIPAC, CI/CD, gitops, testbed

<!--- Top of README Badges (automated) --->
[![PyPI](https://img.shields.io/pypi/v/wipac-dev-actions-testbed)](https://pypi.org/project/wipac-dev-actions-testbed/) [![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/WIPACrepo/wipac-dev-actions-testbed-python?include_prereleases)](https://github.com/WIPACrepo/wipac-dev-actions-testbed-python/) [![Versions](https://img.shields.io/pypi/pyversions/wipac-dev-actions-testbed.svg)](https://pypi.org/project/wipac-dev-actions-testbed) [![PyPI - License](https://img.shields.io/pypi/l/wipac-dev-actions-testbed)](https://github.com/WIPACrepo/wipac-dev-actions-testbed-python/blob/main/LICENSE) [![GitHub issues](https://img.shields.io/github/issues/WIPACrepo/wipac-dev-actions-testbed-python)](https://github.com/WIPACrepo/wipac-dev-actions-testbed-python/issues?q=is%3Aissue+sort%3Aupdated-desc+is%3Aopen) [![GitHub pull requests](https://img.shields.io/github/issues-pr/WIPACrepo/wipac-dev-actions-testbed-python)](https://github.com/WIPACrepo/wipac-dev-actions-testbed-python/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Aopen)
<!--- End of README Badges (automated) --->

# wipac-dev-actions-testbed-python

A guinea pig for testing `wipac-dev-*-action` packages and workflows -- using python
fastapi_rlr 0.1.1
FastAPI middleware for IP-based rate limiting using Redis, with configurable request limits and time windows.
Requires Python: >=3.11

# FastAPI Rate Limiter Middleware

## Project Description

This project implements a **Rate Limiting Middleware** for a FastAPI application. The middleware restricts how many requests a client (identified by IP address) can make within a defined time window. It helps protect your API from abuse, excessive traffic, and denial-of-service (DoS) attacks by throttling requests at the middleware level before they reach the main application logic.

---

## Key Features

- 🔒 **Per-IP Rate Limiting**: Limits each unique IP address to a fixed number of requests within a given time window.
- ⏱️ **Configurable Limits**: Easily set the number of allowed requests and time window (e.g., 5 requests per 60 seconds).
- 🧠 **Smart Storage with Redis**: Uses Redis to efficiently store and manage request counters with TTL (time-to-live).
- 📉 **Fail-Open Strategy**: If Redis is unavailable, the middleware gracefully lets requests through to avoid blocking legitimate users.
- 🔄 **Auto Reset**: Counters reset automatically after the time window expires.
- 📦 **Reusable Component**: Designed as a plug-and-play middleware class for any FastAPI project.

---

## How It Works

1. When a request comes in, the middleware checks the client’s IP address.
2. It creates or updates a Redis key that tracks the number of requests from that IP.
3. If the request count exceeds the allowed limit:
   - The request is rejected with HTTP `429 Too Many Requests`.
   - A message is returned including the `retry_after_seconds` field indicating how long to wait before retrying.
4. If under the limit, the request proceeds normally to the API endpoint.

---

## Tech Stack

| Technology  | Purpose                              |
|-------------|--------------------------------------|
| **FastAPI** | Web framework for building APIs      |
| **Redis**   | In-memory data store for counters    |
| **Uvicorn** | ASGI server to run the FastAPI app   |
| **Starlette** | Base for FastAPI and middleware     |

---

## Example


```python
# main.py
from fastapi import FastAPI
from fastapi_rate_limiter import RateLimiterMiddleware

app = FastAPI()

# Add middleware with Redis URL
app.add_middleware(
    RateLimiterMiddleware,
    redis_url="redis://localhost:6379",  # Adjust to your Redis config
    max_requests=5,
    window_seconds=60
)

@app.get("/")
async def root():
    return {"message": "Hello, World!"}

```
PyOpenocdClient 0.1.1
Library for controlling OpenOCD from Python programs
Requires Python: >=3.7

# PyOpenocdClient

[![Build documentation](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/build_doc.yml/badge.svg?event=schedule)](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/build_doc.yml)
[![Code quality checks](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/code_quality.yml/badge.svg?event=schedule)](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/code_quality.yml)
[![Unit tests](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/unit_tests.yml/badge.svg?event=schedule)](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/unit_tests.yml)
[![Integration tests](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/integration_tests.yml/badge.svg?event=schedule)](https://github.com/HonzaMat/PyOpenocdClient/actions/workflows/integration_tests.yml)

**PyOpenocdClient** is a Python library for controlling [OpenOCD](https://openocd.org)
software tool.

It allows to send TCL commands from Python programs to OpenOCD &mdash; for instance commands like halt execution of the program, view data in memory, place breakpoints, single-step, ...

Main features of PyOpenocdClient:

* allow to send any TCL command to OpenOCD and obtain its result;

* shorcuts for quick use of most common OpenOCD commands are provided;

* command failures are detected (and reported as Python exceptions by default);

* the code is fully covered via unit tests;

* automatic integration testing against multiple versions of OpenOCD;

* the code is multiplatform and portable &mdash; it does not have any dependencies except for the Python's standard library;

* fully open-source under a permissive license (MIT license).


## Quick instructions

Install PyOpenocdClient package using Pip:

```bash
$ python3 -m pip install PyOpenocdClient
```

Basic usage:

```python
from py_openocd_client import PyOpenocdClient

with PyOpenocdClient(host="localhost", port=6666) as ocd:

    ocd.reset_halt()
    ocd.cmd("load_image path/to/program.elf")
    ocd.resume()
    # ...
```

## Documentation

For full documentation, please visit: https://pyopenocdclient.readthedocs.io/en/latest/

&nbsp;
andco-wheelbarrow 0.2.4
our python wheelbarrow. tools for making stuff happen
Requires Python: >=3.11


# wheelbarrow
our wheelbarrow. shared tooling, utils, and scripts. 

## Installation
For a local, editable installation:
```bash
uv pip install -e . --system
```

## Usage 

### `albert.pickle_memoize`

```python
from wheelbarrow.albert import pickle_memoize

def make_data():
    # computationally expensive process
    return np.random.rand(100, 100)

data = pickle_memoize("data.pkl", make_data)    # will cache in memory and on disk 
```
pangea-boto3 0.2.0
A wrapper around the boto3 Bedrock Runtime client
Requires Python: >=3.10

# Pangea + boto3

A wrapper around boto3's Bedrock Runtime client that wraps the `converse` API
with Pangea AI Guard. Supports Python v3.10 and greater.

## Installation

```bash
pip install -U pangea-boto3
```

## Usage

```python
import os

import boto3

from pangea_boto3 import converse

# Create a Bedrock Runtime client.
brt = boto3.client("bedrock-runtime")

# Use pangea_boto3's `converse()` function instead of `brt.converse()`.
response = converse(
    # Pass the Bedrock Runtime client.
    brt,
    # Pangea arguments.
    pangea_api_key=os.getenv("PANGEA_API_KEY", ""),
    pangea_input_recipe="pangea_prompt_guard",
    pangea_output_recipe="pangea_llm_response_guard",
    # `converse()` arguments.
    modelId="anthropic.claude-3-5-sonnet-20240620-v1:0",
    messages=[{"role": "user", "content": [{"text": "Describe the purpose of a 'hello world' program in one line."}]}],
    inferenceConfig={"maxTokens": 512, "temperature": 0.5, "topP": 0.9},
    # ...
)

print(response["output"])
```
nmdc-geoloc-tools 0.3.0
NMDC library to request geolocation information including elevation, soil type, and landuse
Requires Python: >=3.10

# GeoEngine geolocation tool
Library to request information about a location regarding the elevation, soil type, and landuse from various web services:

* [ORNL MODIS](https://modis.ornl.gov/rst/ui/#!/products/get_products)
* [Google Maps Platform](https://developers.google.com/maps/documentation)

## Development

### Prerequisites

- [uv](https://docs.astral.sh/uv/getting-started/installation/)

### Setup

Install dependencies with uv. This will also create a new virtual environment if necessary.

```bash
uv sync
```

### Testing

Run the test suite using the Makefile target `test`.

```bash
make test
```

### Linting

Run the linter using the Makefile target `lint`.

```bash
make lint
```

Some issues can be automatically fixed by running the Makefile target `lint-fix`.

```bash
make lint-fix
```

### Releasing

To release a new version to PyPI, create a new GitHub Release with a tag in the format `vX.Y.Z`. This will trigger a GitHub Action that will publish the new version to PyPI.
vercel-mgmt 0.1.6
Cancel multiple builds right from the terminal
Requires Python: >=3.12

# vercel-mgmt

Cancel multiple builds right from the terminal

```
uvx vercel-mgmt -t <bearer_token> -tid <team_id>
```

![](example.png)

```
## DEBUGGING
# terminal 1
uv run textual console -x SYSTEM -x EVENT -x DEBUG -x INFO -x WORKER
# terminal 2
uv run textual run --dev ./src/vercel_mgmt/mgmt.py -t <bearer_token> -tid <team_id>
```