Skip to main content

Package contains a set of interfaces to operate `uurl` application.

Project description

made-with-python Build Status Coverage Status Code style: black Checked with pylint Checked with flake8 Checked with pydocstyle Checked with interrogate Checked with mypy License EO principles respected here PyPI version shields.io PyPI pyversions Downloads

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:

Contributing

I would highly appreciate any contribution and support. If you are interested to add your ideas into project please follow next simple steps:

  1. Clone the repository
  2. Configure git for the first time after cloning with your name and email
  3. pip install -r requirements.txt to install all project dependencies
  4. pip install -r requirements-dev.txt to install all development project dependencies
  5. Create your feature branch (git checkout -b feature/fooBar)
  6. Commit your changes (git commit -am 'Add some fooBar')
  7. Push to the branch (git push origin feature/fooBar)
  8. 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.

⬆ back to top

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uurl-0.0.2.tar.gz (156.8 kB view details)

Uploaded Source

Built Distribution

uurl-0.0.2-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

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

Hashes for uurl-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6d8fd20f88c2dc399919a1992a44e380fe64b7b2ce38063f80b069befac5af2f
MD5 6bd9b5e79fbfa5ac4c3590772ae7800d
BLAKE2b-256 a4b61e905dc44c4addc1168bd7f4ebfc07873356cdd787ba4f8ac9639e595907

See more details on using hashes here.

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

Hashes for uurl-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a5b8b5ef7f07545f0b0e1b328dab93eefc2d5792595b1c2c0198d32d16ea7a
MD5 8983fb49f57f4be403d77480c40668d8
BLAKE2b-256 7827f615f65a27fbeba635a0b895b0eb2460f0158a0bcb9b6214876b76dabf19

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page