repath
Generate regular expressions form ExpressJS path patterns
Decision gist · record as of 2026-08-14
Yes, but with caution. The package is stable and has no known vulnerabilities, and it solves a specific problem well if you need Express-style path-to-regex conversion in Python. However, it is abandoned—no updates since 2019—so if you encounter bugs or need features, you will need to fork or patch it yourself. For new projects, verify that the dependency on six and the lack of recent Python version testing do not create compatibility issues in your environment.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Installation is straightforward with low friction—a pure Python wheel with only six as a runtime dependency.
- However, the package is abandoned; the last release was in 2019 and no commits have been made since then.
License · maintenance · safety
MIT (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions, making it safe to adopt in most projects.
last release 2019-10-08 (2502 days) · last repo commit 2019-10-08 · 14 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 506,625 downloads/mo, #6,285 on PyPI
Alternatives
Verify before relying
import re
import repath
pattern = repath.pattern('/user/:name')
match = re.match(pattern, '/user/alice')
if match:
params = match.groupdict()- Whether the package works correctly with modern Python versions beyond those tested at release time.
- Whether six dependency is still necessary or if Python 2 support is still relevant for current use.
What it is and what it does
repath is a Python port of the Node.js path-to-regexp module. It takes Express-style path strings—where parameters are marked with colons like `:name`—and generates regular expression patterns you can compile and use with Python's re module to match and extract values from URL paths. The package handles named parameters, optional segments (suffixed with `?`), zero-or-more matches (`*`), one-or-more matches (`+`), custom regex patterns, and unnamed capture groups.
You use it by calling repath.pattern() to generate a regex pattern string, then compiling that pattern with re.compile() and matching against actual URL paths. It also provides a template() function to reverse the process—taking a path template and a dictionary of values to generate a filled-in path string. The package exposes lower-level functions like parse() and tokens_to_pattern() for advanced use cases.
Use it for
- Build a web framework or routing layer that needs to match incoming URL paths to handler functions using Express-like syntax.
- Parse and validate dynamic URL structures where path segments contain variable data that must be extracted.
- Generate URL patterns for testing or documentation that describe what paths your application will accept.
- Convert Express route definitions to Python patterns when porting Node.js applications.
- Create a URL templating system where you define a pattern once and generate concrete URLs with different parameter values.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, but with caution.
The package is stable and has no known vulnerabilities, and it solves a specific problem well if you need Express-style path-to-regex conversion in Python. However, it is abandoned—no updates since 2019—so if you encounter bugs or need features, you will need to fork or patch it yourself. For new projects, verify that the dependency on six and the lack of recent Python version testing do not create compatibility issues in your environment.
Install
repath on PyPI
Before you install
Installation is straightforward with low friction—a pure Python wheel with only six as a runtime dependency. However, the package is abandoned; the last release was in 2019 and no commits have been made since then.
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions, making it safe to adopt in most projects.
Quickstart
import re
import repath
pattern = repath.pattern('/user/:name')
match = re.match(pattern, '/user/alice')
if match:
params = match.groupdict()
Verify before relying
- Whether the package works correctly with modern Python versions beyond those tested at release time.
- Whether six dependency is still necessary or if Python 2 support is still relevant for current use.
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagesix |
| Maintenance | Abandoned 2,502 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 506,625 / month, #6,285 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishOperating System :: OS IndependentProgramming Language :: Python :: 2Programming Language :: Python :: 3Topic :: InternetTopic :: Internet :: WWW/HTTP |
Evidence: repath-0.9.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “express path to regex”
- repathConverts Express-style path strings (like `/user/:name`) into regular…
- pytest-regexA pytest plugin that selects tests to run using Python regular…
- jinja2-ansible-filtersProvides a collection of Jinja2 template filters ported from Ansible,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Internet packages
Botocore provides low-level, data-driven access to Amazon Web Services APIs, serving as the foundation for the AWS CLI and boto3 libraries.
Install it if you need programmatic access to AWS services.
Provides an async client for AWS services using botocore and aiohttp, allowing you to call AWS APIs asynchronously within asyncio-based applications.
Install it if you need to call AWS services from async Python code; it is the standard way to do so.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides a platform-independent file locking mechanism to coordinate access to files across processes and threads.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides common Protocol Buffer message definitions used across Google Cloud APIs, enabling Python clients to interact with Google services.
See also exrex · sanic-routing · greenery · regex · regexploit · stringparser · re-assert · iregexp-check · regress · multiregex