Skip to main content

UrlAdjust is a Python package that help developer generate get http request url with template and adjustment info. It aims to simplify the url generation process for get http request url.

Project description

UrlAdjust: Url Adjustment Toolkit

What is it?

UrlAdjust is a Python package that help developer generate get http request url with template and adjustment info. It aims to simplify the url generation process for get http request url.

Main Features

Parse template url and update the get request url with the adjustment info.

Allow user to provide higher order function to modify multiple key value pairs matching the same regular expression pattern.

Where to get it

pip install urlAdjust==<version>

example:

pip install urlAdjust==0.1.0

How to use it

Python 3.9.6 (default, Feb  3 2024, 15:58:27) 
[Clang 15.0.0 (clang-1500.3.9.4)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from url_adjust import url
>>> aws_url = url.Url('https://aws.amazon.com/cn/what-is/blockchain/?aws-products-all.sort-by=item.additionalFields.productNameLowercase&aws-products-all.sort-order=asc')
>>> str(aws_url)
'https://aws.amazon.com/cn/what-is/blockchain/?aws-products-all.sort-by=item.additionalFields.productNameLowercase&aws-products-all.sort-order=asc'
>>> aws_url.add_or_update_query_param("newkey", "newvalue")
>>> str(aws_url)
'https://aws.amazon.com/cn/what-is/blockchain/?aws-products-all.sort-by=item.additionalFields.productNameLowercase&aws-products-all.sort-order=asc&newkey=newvalue'

Dependencies

  • Python (>= 3.9)

License

  • MIT

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

urladjust-0.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

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

urlAdjust-0.1.2-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file urladjust-0.1.2.tar.gz.

File metadata

  • Download URL: urladjust-0.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for urladjust-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a583871ea4d2f95fd3082701423726b95b6a1cb001903aa59d22e202f2bc21d3
MD5 99c717cc178cdb109c4da34d41677bd5
BLAKE2b-256 ad921f79a2ba387d11a16e0db661c72ac6b06fd546fce94934631b3054aff771

See more details on using hashes here.

File details

Details for the file urlAdjust-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: urlAdjust-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for urlAdjust-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 aa9b204b1bb0c69c49bec742be80b93fb8f9d6c7852b758c2f0fbb1f1e4a1cf3
MD5 f13d55c5197897617b98f63cb9745101
BLAKE2b-256 244336b83f194ef65521b2e43045ea943115af896f6574befc007b01d96df555

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