Skip to main content

Discord

Badges
Build Python package semantic-release PyPI Read the Docs
Tests coverage pre-commit
Standards SemVer 2.0.0 Conventional Commits
Code Code style: black Imports: isort Checked with mypy
Repo GitHub issues GitHub stars GitHub license All Contributors

BuildURL

Simple URL builder

Read the Docs

Installation

pip

buildurl is available on pip:

pip install buildurl

GitHub

You can also install the latest version of the code directly from GitHub:

pip install git+git://github.com/MicaelJarniac/BuildURL

Usage

For more examples, see the full documentation.

from buildurl import BuildURL

# Use the `/` operator to add a string as a path to the end of the URL, like so:
url = BuildURL("https://pypi.org")
url /= "project"
url /= "buildurl"
print(url.get)  # https://pypi.org/project/buildurl

# Or, using a list:
url = BuildURL("https://pypi.org")
url /= ["project", "buildurl"]
print(url.get)  # https://pypi.org/project/buildurl

# Use the `+` operator to add a dict as a query:
url = BuildURL("https://example.com")
url += {"testing": "true"}
url += {"fruit": "apple"}
print(url.get)  # https://example.com?testing=true&fruit=apple

# Those operations can also be done without modifying the original URL:
url = BuildURL("https://python.org")
print(url.get)  # https://python.org
print((url / "doc").get)  # https://python.org/doc
print(url.get)  # https://python.org

# To get the final URL as a string:
url = BuildURL("https://example.com")
url.get
str(url)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

More details can be found in CONTRIBUTING.

Contributors ✨


Micael Jarniac

💻 📖 💡 🤔 🚧 📦 📆 ⚠️

License

MIT

Metadata

Release files for buildurl 4.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 buildurl 4.0.1
File Size Uploaded Provenance Actions
buildurl-4.0.1.tar.gz 8.5 kB Without provenance Details for buildurl-4.0.1.tar.gz

Release files / buildurl-4.0.1.tar.gz

Download URL buildurl-4.0.1.tar.gz
Size 8.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ee7b18e2b2a34e42678018171bf37bb07fd3fadef511122404c1a22bad134cdb
BLAKE2b-256 checksum
How to use checksums
ac61bb0e2e656b5fe57ae8cd1295fb1a06f4b4caa39394ea505a33dac8fe195e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for buildurl 4.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