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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file urlAdjust-0.1.1.tar.gz.
File metadata
- Download URL: urlAdjust-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6a3fae46d28f586354c6a7dc2c2718776b408ac1e5759287c9a92007891ebe40
|
|
| MD5 |
d5cc14d7ff814f378034aef10dc384df
|
|
| BLAKE2b-256 |
a30cf05d2c1c323bfaabc31977757390d80add3f699874fde8cb5610b4e128d8
|
File details
Details for the file urlAdjust-0.1.1-py3-none-any.whl.
File metadata
- Download URL: urlAdjust-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4b7bca4c84bc0a3d4f94a8a34174e5a913473ab7aeb71c808981252ced24df2
|
|
| MD5 |
87e02066040679f461d1c6d44a1d3bf4
|
|
| BLAKE2b-256 |
031a1a6d03187482ea4a0949f660890b0fefd47ed9ee287dfeb27ac51ac676b3
|