aws / aws/chalice

'path' URL variables that include \'s

Open
#866 6 comments 7 reactions 0 assignees View on GitHub
feature-request
Dominant language
Python
Stars
11.1k
Forks
1k
Avg merge
1d 22h
Merged PRs (30d)
2

Description

I have a case where I need to match against an unknown number of sub-paths after some initial path variables.

I'd like something equivalent to flask's `path` converter (http://flask.pocoo.org/docs/0.12/quickstart/#variable-rules) that will let me match against the remaining path, including any extra /'s.

E.g.

`@app.route('/{prefix}/{path:rest}')`

should match paths like /a/b (prefix=a, rest=b), /a/b/c (prefix=a, rest=b/c), /a/b/c/d.txt (prefix=a, rest=b/c/d.txt), etc.

Contributor guide

Open the contributing guide

Research direction

Start from the app.route declaration described in the issue and compare its requested behavior with Flask's path converter documentation. Trace the route-matching entry point and existing routing tests, then verify that the examples match while preserving slashes in the remaining path.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.