--- id: fake-headers version: "1.0.2" license: MIT license_treatment: permissive maintenance: abandoned --- # fake-headers — Package for generate headers to http requests. License: permissive · Maintenance: abandoned · Downloads: 73.5K/mo ## What it is and what it does fake-headers is a lightweight Python library that generates realistic HTTP headers and User-Agent strings without requiring internet access. It uses bs4 and html5lib to parse and construct headers that mimic real browsers (Chrome, Firefox, Opera) across different operating systems (Windows, macOS, Linux). The package is designed for scenarios where you need to make HTTP requests appear to come from a real browser rather than a script. You instantiate a Headers object with optional parameters specifying which browser and OS to simulate, then call generate() to get a dictionary of headers ready to pass to HTTP libraries like requests. The package can optionally include additional headers beyond User-Agent, such as Accept, Accept-Language, and Cache-Control. However, the package has been abandoned since mid-2019, so the User-Agent strings and header patterns it generates may not reflect current browser behavior. Use it for: - Web scraping where the target site blocks requests with missing or suspicious User-Agent headers - Testing HTTP client code that needs to simulate requests from different browsers without mocking - Rotating User-Agent strings in automated HTTP requests to avoid detection as a bot - Local development and testing that requires realistic browser headers without external dependencies ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates realistic User-Agent strings and HTTP headers locally without making internet requests, supporting customization by browser (Chrome, Firefox, Opera) and OS (Windows, macOS, Linux). Yes, if you need a simple, dependency-light way to generate User-Agent strings for local testing or scraping. No, if you need current, maintained header generation—the package is abandoned and its User-Agent strings are from 2019 browsers. Consider it only for projects where outdated headers are acceptable or where you control the target server. ## Install pip install fake-headers uv add fake-headers poetry add fake-headers ## Installing fake-headers Before you install: Low install friction with only two runtime dependencies (bs4, html5lib). However, the package is abandoned—last release was 2019-06-16 with no commits since then. Use only if the static header generation meets your needs without expecting maintenance or updates. License in practice: MIT license permits commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text. Quickstart: pip install fake-headers from fake_headers import Headers header = Headers(browser="chrome", os="win", headers=True) print(header.generate()) Verify before relying: - Whether the generated User-Agent strings remain realistic given the package has not been updated since 2019 - Whether the header generation works reliably with current versions of bs4 and html5lib ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 73.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags user agent generator, fake http headers, random user agent, browser spoofing headers, http request headers, user agent string, web scraping headers, user-agent, web-scraping, http-headers [View on SkillFed](https://skillfed.io/packages/fake-headers) · [View on PyPI](https://pypi.org/project/fake-headers/)