Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: relative url in URL datastructure #2888

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

palani-johnson
Copy link

Summary

In some of my FastAPI applications I have found the need for a relative URL function that gives you a URL that is only the path, query and fragment. I figured others might find it useful. Having it as a method on the class directly is useful in situations like Jinja templates so you dont have to pass in a helper function.

Checklist

  • I understand that this PR may be closed in case there was no previous discussion. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I have not updated the documentation as the URL data structure is not documented on the website.

@palani-johnson palani-johnson changed the title Feature:relative url in URL datastructure Feature: relative url in URL datastructure Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant