Provides user-friendly HTTP client with clean objects.
Project description
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
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:
- vyahello@gmail.com
- https://github.com/vyahello
- https://www.linkedin.com/in/volodymyr-yahello-821746127
Contributing
- clone the repository
- configure Git for the first time after cloning with your
name
andemail
pip install -r requirements.txt
to install all project dependenciespip install -r requirements-dev.txt
to install all development project dependencies
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.