Package contains a set of interfaces to operate `uurl` application.
Project description
uURL
Provides user-friendly unified resource locator (URL) client with nothing but clean objects.
Tools
Usage
To obtain latest package from PYPI, please run following script:
pip install uurl
✨ 🍰 ✨
Quick start
Pre-defined URL
>>> from uurl import Host, HttpsUrl, UrlPath
>>> url = HttpsUrl(Host('example.com'), UrlPath('shelter', 'index.html'))
>>> url.matcher()
'shelter/index.html'
>>> url.host()
'example.com'
>>> url.host(with_port=True)
'example.com:443'
>>> str(url)
'https://example.com:443/shelter/index.html'
Custom URL
>>> from uurl import Host, NetworkProtocol, NetworkPort, Url, UrlPath
>>> url = Url(
... Host('0.0.0.0'),
... NetworkProtocol('http', NetworkPort(8080, has_upd=True, has_tcp=True)),
... UrlPath('api', 'rest', '1001')
... )
>>> url.matcher()
'api/rest/1001'
>>> url.host()
'0.0.0.0'
>>> url.host(with_port=True)
'0.0.0.0:8080'
>>> str(url)
'http://0.0.0.0:8080/api/rest/1001'
Development notes
Testing
Generally, pytest
tool is used to organize testing procedure.
Please follow next command to run unittests:
pytest
CI
Project has Travis CI integration using .travis.yml file thus code analysis (black
, pylint
, flake8
, mypy
, pydocstyle
and interrogate
) and unittests (pytest
) will be run automatically after every made change to the repository.
To be able to run code analysis, please execute command below:
./analyse-source-code.sh
Release notes
Please check changelog file to get more details about actual versions and it's release notes.
Meta
Author – Volodymyr Yahello. Please check authors file for more details.
Distributed under the MIT
license. See license for more information.
You can reach out me at:
- vyahello@gmail.com
- https://github.com/vyahello
- https://www.linkedin.com/in/volodymyr-yahello-821746127/
Contributing
I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:
- Clone the repository
- Configure
git
for the first time after cloning with yourname
andemail
pip install -r requirements.txt
to install all project dependenciespip install -r requirements-dev.txt
to install all development project dependencies- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request
What's next
All recent activities and ideas are described at project issues. If you have ideas you want to change/implement please do not hesitate and create an issue.
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
File details
Details for the file uurl-0.0.2.tar.gz
.
File metadata
- Download URL: uurl-0.0.2.tar.gz
- Upload date:
- Size: 156.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6d8fd20f88c2dc399919a1992a44e380fe64b7b2ce38063f80b069befac5af2f |
|
MD5 | 6bd9b5e79fbfa5ac4c3590772ae7800d |
|
BLAKE2b-256 | a4b61e905dc44c4addc1168bd7f4ebfc07873356cdd787ba4f8ac9639e595907 |
File details
Details for the file uurl-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: uurl-0.0.2-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5a5b8b5ef7f07545f0b0e1b328dab93eefc2d5792595b1c2c0198d32d16ea7a |
|
MD5 | 8983fb49f57f4be403d77480c40668d8 |
|
BLAKE2b-256 | 7827f615f65a27fbeba635a0b895b0eb2460f0158a0bcb9b6214876b76dabf19 |