Skip to main content

Url parsing and editing as an object or in a functional style.

>>> from urledit import urledit
>>> url = 'forum/showthread.php?s=12345&p=728386#post728386'

Functional style

>>> urledit(url)(scheme='http')(netloc='host.com')(fragment=''
... ).param(s=None).param(a=1).param(b=['x', 'y', 'z']).join()
'http://host.com/forum/showthread.php?p=728386&a=1&b=x&b=y&b=z'

or

>>> urledit(url, scheme='http', netloc='host.com', fragment=''
... ).param(s=None, a=1, b=['x', 'y', 'z']).join()
'http://host.com/forum/showthread.php?p=728386&a=1&b=x&b=y&b=z'

Object style

>>> u = urledit(url)
>>> u.scheme, u.netloc, u.path, u.qs, u.fragment
('', '', 'forum/showthread.php', 's=12345&p=728386', 'post728386')
>>> u.scheme, u.netloc, u.fragment = 'http', 'host.com', ''
>>> u.join()
'http://host.com/forum/showthread.php?s=12345&p=728386'

Working with query string:

>>> u.query
{'p': '728386', 's': '12345'}
>>> del u.query['s']
>>> u.join()
'http://host.com/forum/showthread.php?p=728386'
>>> u.query['a'] = 1
>>> u.query['b'] = ['x', 'y', 'z']
>>> u.join()
'http://host.com/forum/showthread.php?p=728386&a=1&b=x&b=y&b=z'

Metadata

Release files for urledit 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for urledit 1.0.1
File Size Uploaded Provenance Actions
urledit-1.0.1.tar.gz 2.4 kB Without provenance Details for urledit-1.0.1.tar.gz

Release files / urledit-1.0.1.tar.gz

Download URL urledit-1.0.1.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
290eafc1a4b28072fb11488d5240c60ec618ea918057ad9acd3e16f70fd3969e
BLAKE2b-256 checksum
How to use checksums
0b2e336e4be0f7ddf04d548d2b676974b908bd2027f820910264d7dd7e8a0492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for urledit 1.0.1

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page