rfc3987
Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)
What it is and what it does
rfc3987 is a regex-based URI and IRI parser and validator that implements the RFC 3986 and RFC 3987 specifications. It provides functions to match strings against RFC rules, parse URIs into their component parts (scheme, authority, path, query, fragment), compose URIs from parts, and resolve relative URI references against a base URI. The package has no runtime dependencies and is distributed as a pure Python wheel.
The module is designed for applications that need strict RFC-compliant URI handling, such as web frameworks, HTTP clients, or any tool that must correctly parse and validate internationalized resource identifiers. It includes pre-compiled regex patterns and utilities to extract named subcomponents from URIs. However, the package has been archived since 2018 and receives no active maintenance, so it should be considered stable but not evolving.
Use it for:
- Validate URI strings against RFC 3986 rules before processing them in a web application.
- Parse a URI into its component parts (scheme, host, path, query, fragment) for routing or request handling.
- Resolve relative URI references (e.g., '../page') against a base URI to compute absolute URIs.
- Extract and validate percent-encoded components or check for well-formed IPv6 addresses in URIs.
- Build URI composition utilities that guarantee RFC 3986 compliance in URL generation.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides RFC 3986 and RFC 3987 compliant regular expressions and utilities for parsing, validating, and resolving URIs and IRIs.
Yes, with conditions. The package is stable, has no dependencies, and correctly implements RFC 3986/3987 for URI parsing and validation. However, it is archived and unmaintained since 2018, so it will not receive bug fixes or Python compatibility updates. Install it only if you need RFC-compliant URI handling and are willing to accept that maintenance responsibility yourself. The GPLv3+ copyleft license also requires careful review if you are building proprietary software.
Install
rfc3987 on PyPI
pip
pip install rfc3987uv
uv add rfc3987poetry
poetry add rfc3987Installing rfc3987
Before you install
Low install friction with no runtime dependencies. However, the package is archived and unmaintained since 2018, with the last commit in January 2024 showing only minor fixes. It is marked as Production/Stable but receives no active development.
License in practice
Licensed under GNU GPLv3+, a copyleft license. Any code that imports and uses this package in a proprietary application must comply with GPLv3+ terms, including potential source code disclosure obligations.
Quickstart
from rfc3987 import match, parse, resolve
# Validate a URI component
assert match('%C7', 'pct_encoded')
# Parse a URI into components
d = parse('http://example.com/path#fragment', rule='URI')
print(d['scheme'], d['authority'], d['path'])
# Resolve a relative URI against a base
result = resolve('http://a/b', '../c')
GPLv3+ copyleft license requires careful review before use in proprietary code. Package is archived and no longer maintained.
Verify before relying
- Whether the package works reliably with modern Python versions beyond 3.6, given its archived status and lack of recent updates.
- Whether the optional regex module dependency (mentioned in docs) is actually required for common use cases or only for advanced pattern compilation.
Package facts
| License | GNU GPLv3+ (copyleft) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | abandoned — 2,938 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 2,996,291/month — #2,794 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: rfc3987-1.3.8-py2.py3-none-any.whl
Keywords: URI, IRI, URL, rfc3986, rfc3987, validation
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
hyperlinkHyperlink provides an immutable, RFC…
permissive · top 1,000 on PyPI
rfc3987-syntaxValidates that strings conform to the ABNF…
permissive · top 1,000 on PyPI
arcpGenerate and parse arcp (Archive and Package)…
permissive · top 15,000 on PyPI
rfc3986Parses, validates, and normalizes URIs…
permissive · top 1,000 on PyPI
rfc3986-validatorValidates URLs and URI references against the…
permissive · top 1,000 on PyPI
uritoolsParses, validates, and composes URIs and URI…
permissive · top 5,000 on PyPI
uritemplateExpands RFC 6570 URI templates by substituting…
permissive · top 1,000 on PyPI
pyuriPyURI parses, constructs, and manipulates URIs…
permissive · top 15,000 on PyPI
uri-templateExpands RFC 6570 URI Templates with variable…
permissive · top 1,000 on PyPI
std-uritemplateExpands RFC 6570 URI Templates (Level 4) by…
permissive · top 5,000 on PyPI