--- id: vercel-headers version: "0.7.1" license: MIT license_treatment: permissive maintenance: active --- # vercel-headers — Request header helpers for Vercel Python applications License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does vercel-headers is a lightweight utility for Vercel Python applications that centralizes request header handling. It stores headers once per request and exposes them through a shared context that other helpers (OIDC, cache) can access. The package provides convenience methods to extract IP addresses and geolocation information from the registered headers. The package is designed for serverless functions running on Vercel's platform where you need consistent access to request metadata across your application logic. It has no external runtime dependencies, making it a minimal addition to your project. The API is straightforward: call set_headers() early in your request handler, then use the exposed helpers to retrieve IP and location data as needed. Use it for: - Extract client IP address in Vercel functions for logging, rate limiting, or access control. - Retrieve geolocation data from request headers to customize responses by region. - Share request context across multiple helper modules (OIDC, cache) without passing headers repeatedly. - Build request-scoped middleware that needs consistent header access throughout the request lifecycle. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Registers and exposes request headers for Vercel Python functions, providing helpers to extract IP addresses and geolocation data from the request context. Yes, if you are building Python applications on Vercel and need to work with request headers and geolocation. The package is actively maintained, has no dependencies, and carries a permissive license. It solves a real problem for Vercel-specific development with minimal friction. Not relevant for non-Vercel deployments. ## Install pip install vercel-headers uv add vercel-headers poetry add vercel-headers ## Installing vercel-headers Before you install: Low friction install with no runtime dependencies. Active maintenance status and recent releases (latest 29 days old) suggest ongoing support. License in practice: MIT license permits unrestricted use, modification, and distribution in both open and closed projects. Quickstart: pip install vercel-headers from vercel.headers import set_headers set_headers(request.headers) Requires Python 3.10 or later. Verify before relying: - Whether geolocation data is derived from Vercel's infrastructure or requires external services. - What specific IP address extraction methods are available (e.g., client IP vs. proxy detection). - How the OIDC and cache helpers mentioned in the description integrate with this package. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags vercel request headers, vercel python helpers, extract ip address vercel, geolocation from headers, vercel function context, request header management, vercel-specific, request-headers [View on SkillFed](https://skillfed.io/packages/vercel-headers) · [View on PyPI](https://pypi.org/project/vercel-headers/)