qsreplace
qsreplace is a Python utility to replace query parameters in URLs.
Installation
You can install qsreplace using pip:
pip install qsreplace
Usage
After installing qsreplace, you can use it in your Python scripts. Here's how you can use the qsreplace function:
from qsreplace import qsreplace
# Example usage
url_lst = ["https://example.com", "https://example.com/?param=value"]
payloads = ["new_value", "another_value"]
replaced_urls = qsreplace(url_lst, payloads, edit_base_url=True, url_encode=True)
for url in replaced_urls:
print(url)
Result:
https://example.com/new_value
https://example.com/another_value
https://example.com/?param=new_value
https://example.com/?param=another_value
In the example above:
url_lstshould contain a list of URLspayloadsis a list of values that will replace query parameters in the URLs Listedit_base_urltells qsreplace whether or not to append payload to base urls i.e. which doesn't contain any parameters in it.url_encodedefines whether it should encode the generated urls or not
Metadata
Release files for qsreplace 0.0.4.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| qsreplace-0.0.4.post1.tar.gz | 6.1 kB | Without provenance | Details for qsreplace-0.0.4.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| qsreplace-0.0.4.post1-py3-none-any.whl | Python 3 | none | any | Details for qsreplace-0.0.4.post1-py3-none-any.whl |
Total release size: 12.5 kB
Release files / qsreplace-0.0.4.post1.tar.gz
| Download URL | qsreplace-0.0.4.post1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e44197e7fbc48860911b4ebe4e31dac31aaacdf16131b807fb3ffd4cb6eb367b
|
|
BLAKE2b-256 checksum How to use checksums |
ac48a66b930a5e5cf2fa798cc28182343dd56943f0fb4ec39a04624b0bb72e1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.9
|
Release files / qsreplace-0.0.4.post1-py3-none-any.whl
| Download URL | qsreplace-0.0.4.post1-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a8b71a2a0c233a995974181d1e737d4c2d07c8c00a24dc8be301ffaf0cdc8c0
|
|
BLAKE2b-256 checksum How to use checksums |
d1033b7aa1c098e79ebef3794806d73f31657516163df517afe45533d3a46fd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.9
|
Security for qsreplace 0.0.4.post1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.