Skip to main content

urledit

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

>>> from urledit import urledit
>>> url = 'forum/showthread.php?s=9b5d99fc6a61a17cc07326714500b3ab&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=9b5d99fc6a61a17cc07326714500b3ab&p=728386', 'post728386')
>>> u.scheme, u.netloc, u.fragment = 'http', 'host.com', ''
>>> u.join()
'http://host.com/forum/showthread.php?s=9b5d99fc6a61a17cc07326714500b3ab&p=728386'

Working with query string:

>>> u.query
{'p': '728386', 's': '9b5d99fc6a61a17cc07326714500b3ab'}
>>> 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

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
File Size Uploaded Provenance Actions
urledit-1.0.tar.gz 2.5 kB Without provenance Details for urledit-1.0.tar.gz

Release files / urledit-1.0.tar.gz

Download URL urledit-1.0.tar.gz
Size 2.5 kB
Tags Source
SHA-256 checksum
How to use checksums
02b67155f2f85a0c122b7633c015fd6777c73645e1691ddb3e8b584d2ff113b6
BLAKE2b-256 checksum
How to use checksums
4cdf1a838cee5fec90d1f8d5b51df214e9bdeca5480cab5b6c39374d9f11f333
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for urledit 1.0

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