Skip to main content

Find version within a url such as 'v1' or '1.1.1'

Project description

url-version-finder

A minimal decorator to extract version information from a request URL — such as v1, v1.2.3, or 1.0.0 — and inject it into your Python function or view.

Features

  • Supports v1, 1.0, v2.5.3, etc.
  • Compatible with Django, FastAPI, Flask, and raw dict requests
  • Automatically adds the version as a parameter to your decorated function

Install

pip install url-version-finder
from url_version_finder.decorators import with_version

@with_version
def my_view(request, version):
    print(f"API version: {version}") # "v1"

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

url_version_finder-0.0.1.tar.gz (1.3 kB view details)

Uploaded Source

Built Distribution

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

url_version_finder-0.0.1-py3-none-any.whl (1.9 kB view details)

Uploaded Python 3

File details

Details for the file url_version_finder-0.0.1.tar.gz.

File metadata

  • Download URL: url_version_finder-0.0.1.tar.gz
  • Upload date:
  • Size: 1.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for url_version_finder-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5f1e13c49f590261558cf9ebc52c309a037ac4bb6896b097eadc27cf19c3666b
MD5 109c62c91b76fd11c26f4498166ac935
BLAKE2b-256 7e4d795f1aec0a04d0f13443b03bd2fd019016ccbf2cce9aed1ef2681dab92a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for url_version_finder-0.0.1.tar.gz:

Publisher: publish.yml on s1129092/version-finder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file url_version_finder-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for url_version_finder-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 56aee1dc80e1c86c4c1f1b391a31d50475fa07f995f327f737aa3821242db17c
MD5 e2afe8aecccf14fdc31e30d3ab98a6d8
BLAKE2b-256 229745a1d411ee21b1d973cb99fc2e991a80cb08b83f80a0c8494be9a7cfa8c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for url_version_finder-0.0.1-py3-none-any.whl:

Publisher: publish.yml on s1129092/version-finder

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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