skillfed

rfc3987

Parsing and validation of URIs (RFC 3986) and IRIs (RFC 3987)

rfc3987 v1.3.8 3.0M downloads/30d#2,794 on PyPI46
Copyleft license GNU GPLv3+ Abandoned released

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 rfc3987

uv

uv add rfc3987

poetry

poetry add rfc3987

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Topic :: Internet

Tags

URI parsing and validationRFC 3986 regex patternsIRI internationalized resource identifiersURI reference resolutionURL component extraction
uri-parsingrfc-compliantarchived

More Internet packages