Skip to main content

Check the safety of a redirect URL. Extracted from Django's `url_has_allowed_host_and_scheme`.

Project description

Safe Redirect URL

Check the safety of a redirect URL. Extracted from Django's `url_has_allowed_host_and_scheme`.

build codecov PyPI version


Documentation: https://frankie567.github.io/safe-redirect-url/

Source Code: https://github.com/frankie567/safe-redirect-url


Development

Setup environment

We use Hatch to manage the development environment and production build. Ensure it's installed on your system.

Run unit tests

You can run all the tests with:

hatch run test

Format the code

Execute the following command to apply linting and check typing:

hatch run lint

Publish a new version

You can bump the version, create a commit and associated tag with one command:

hatch version patch
hatch version minor
hatch version major

Your default Git text editor will open so you can add information about the release.

When you push the tag on GitHub, the workflow will automatically publish it on PyPi and a GitHub release will be created as draft.

Serve the documentation

You can serve the Mkdocs documentation with:

hatch run docs-serve

It'll automatically watch for changes in your code.

License

This project is licensed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safe_redirect_url-0.1.1.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safe_redirect_url-0.1.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file safe_redirect_url-0.1.1.tar.gz.

File metadata

  • Download URL: safe_redirect_url-0.1.1.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.25.2

File hashes

Hashes for safe_redirect_url-0.1.1.tar.gz
Algorithm Hash digest
SHA256 fbfb2b3a3763742e626e855a798b62494c684b269a5bd12956db197c02b4f45f
MD5 9d0db163fcb75d61e6e4b444e31eefba
BLAKE2b-256 3c1727cf636db24770f3d863159dd665d4f59a8499414ae07bab4b660eef3212

See more details on using hashes here.

File details

Details for the file safe_redirect_url-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for safe_redirect_url-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b34741ae511366b6dcc26f03cddcaa011886c091705c4b746f386cb81265b6dd
MD5 0983c0e16cb1e5ac8bd5cc2dc56eaf64
BLAKE2b-256 121629a92c90b0b6833943e877ba1096388b37288658aac6a5a368f059d33d93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page