Skip to main content

edge-proxy-py

PyPI Python Versions License GitHub stars Downloads

edge-proxy-py is a lightweight reverse proxy designed for edge / IoT deployments.

Focus:

  • offline/unstable network conditions
  • routing policies (geo/device/priority)
  • local cache fallback
  • health checks and telemetry

Features

  • Reverse proxy gateway for edge services
  • Policy-based routing (device-id header / path rules)
  • Concurrent backend health checking with connection pooling
  • In-memory cache fallback for GET requests (TTL-based with LRU-like eviction)
  • Prometheus metrics (request count, cache hits/misses, backend health)
  • Graceful shutdown (SIGINT/SIGTERM)

Quickstart

Install

pip install edge-proxy-py

Run

edge-proxy run -c examples/config.yml

Test

curl -H "X-Device-ID: sensor-1" http://localhost:9100/api/data

Architecture

Client ──► edge-proxy ──► Route matching (path_prefix / device_id)
                              │
                         ┌────▼────┐
                         │  Cache  │──► Return cached response (GET only)
                         └────┬────┘
                              │ miss
                         ┌────▼────┐
                         │ Backend │──► forward() via httpx connection pool
                         └────┬────┘
                              ▼
                       Upstream server

Changelog

0.1.1

  • Connection pooling: Shared httpx.AsyncClient singleton for proxy and healthcheck (was creating a client per request/check).
  • Concurrent health checks: Backends checked in parallel via asyncio.gather (was sequential).
  • Graceful shutdown: Signal handlers (SIGINT/SIGTERM) cancel healthcheck loop and close clients cleanly.
  • Logging: Added structured logging throughout; --log-level CLI option.
  • Bare except fixes: All except Exception blocks re-raise asyncio.CancelledError.
  • Build system: Migrated from setuptools to hatchling. Added classifiers, keywords, optional dev/test deps, ruff/pytest config.
  • Tests: Expanded from 1 test to 15+ tests covering config, router, cache, proxy, healthcheck, and backends.
  • CI: Added GitHub Actions workflow (ruff + pytest on 3.10–3.12).

0.1.0

  • Initial release: Reverse proxy, policy-based routing, cache fallback, health checks, Prometheus metrics.

License

MIT

Metadata

Release files for edge-proxy-py 0.1.2

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

Source distribution (sdist)

Source distribution for edge-proxy-py 0.1.2
File Size Uploaded Provenance Actions
edge_proxy_py-0.1.2.tar.gz 9.2 kB Without provenance Details for edge_proxy_py-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for edge-proxy-py 0.1.2
File Interpreter ABI Platform Actions
edge_proxy_py-0.1.2-py3-none-any.whl Python 3 none any Details for edge_proxy_py-0.1.2-py3-none-any.whl

Total release size: 20.0 kB

Release files / edge_proxy_py-0.1.2.tar.gz

Download URL edge_proxy_py-0.1.2.tar.gz
Size 9.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a82005847046a774da0dbd2e6cab08c76ffadf0d1a7a7185dcc6b4433694dd2c
BLAKE2b-256 checksum
How to use checksums
3191cf5fc4d71dd5a0c988355b10b70481f8430e86c9cb688dd195a7a465b142
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Release files / edge_proxy_py-0.1.2-py3-none-any.whl

Download URL edge_proxy_py-0.1.2-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2fc9698b8fd7f3335f9207d06ec018a916e31035815c578351a1d8e7cc9b4057
BLAKE2b-256 checksum
How to use checksums
154559e67fddf322aa31d59f91eba2f27050c80930fff78cf09f4ba9d2400d0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.10

Security for edge-proxy-py 0.1.2

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

0.1.2 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