Skip to main content

Provides user-friendly HTTP client with clean objects.

Project description

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

uRequest

Provides user-friendly micro HTTP client with nothing but clean objects.

Basically, it is a wrapper over requests python library.

Tools

Usage

Installation

Please run following script to obtain latest package from PYPI:

pip install urequest
✨ 🍰 

Quick start

>>> from urequest.session import Session, HttpSession
>>> from urequest.response import Response
>>> from urequest.url import HttpUrl
>>>
>>> session: Session = HttpSession()
>>> response: Response = session.get(HttpUrl(host="xkcd.com", path="info.0.json"))
>>> response.is_ok()
True
>>> response.as_json()
{
    "month": "3",
    "num": 2284,
    "link": "",
    "year": "2020",
    "news": "",
    "safe_title": "Sabotage",
    "transcript": "",
    "alt": "So excited to see everyone after my cruise home from the World Handshake Championships!",
    "img": "https://imgs.xkcd.com/comics/sabotage.png",
    "title": "Sabotage",
    "day": "23",
}

Source code

git clone git@github.com:vyahello/urequest.git
pip install -e .

Or using direct specific release:

pip install git+https://github.com/vyahello/urequest@0.0.1

⬆ back to top

Development notes

CI

Project has Travis CI integration using .travis.yml file thus code analysis (black, pylint, flake8, mypy, pydocstyle) 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 all contributors.

Distributed under the MIT license. See LICENSE for more information.

You can reach out me at:

Contributing

  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

⬆ 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

urequest-0.0.4.tar.gz (9.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urequest-0.0.4-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file urequest-0.0.4.tar.gz.

File metadata

  • Download URL: urequest-0.0.4.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for urequest-0.0.4.tar.gz
Algorithm Hash digest
SHA256 9e3b2613eb96984cfcd0af3403558d8b7412935ad420e05551cc5e925e979d76
MD5 fedf98a5d99f7a2629f225138fa03a27
BLAKE2b-256 cf42e2a3c4cfa8c73a10063a75f54bd69e0a562b0c736d45aa91f21b5cdd63dd

See more details on using hashes here.

File details

Details for the file urequest-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: urequest-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.1 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.8.0

File hashes

Hashes for urequest-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0cac1511d5de98feefa4f7c30503e0ac7db7e7fc22b7584c247bd472fd13bc77
MD5 30a4b2326043c754d3a095a07cff4fdd
BLAKE2b-256 a6d27ddf070cdf2a2bf95f7685bb598a3bffdeaf1070eac01ac2aed73fbc2213

See more details on using hashes here.

Supported by

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