handle urls in a more easy and human way
Project description
chibi_requests
handle urls in a more easy and human way
Free software: WTFPL
Documentation: https://chibi-requests.readthedocs.io.
how to use
Chibi_url
from chibi_requests import Chibi_url
url = Chibi_url( "http://ifconfig.me'" )
response = url.get()
assert response.status_code == 200
assert response.is_text
assert isinstance( response.native, str )
response = url.post()
assert response.status_code == 200
assert response.json
assert isinstance( response.native, dict )
url = Chibi_url( "https://google.com" )
url += "cosa/cosa2'
assert "https://google.com/cosa/cosa2" == url
url += "cosa3"
assert "https://google.com/cosa/cosa2/cosa3" == url
url = Chibi_url( "https://google.com" )
url += { 'param1': 'value1', 'param2': 'value2' }
assert url.parmas == { 'param1': 'value1', 'param2': 'value2' }
url = Chibi_url( "https://google.com" )
url += "?param1=value1"
assert url.parmas == { 'param1': 'value1' }
url = Chibi_url( "https://google.com" )
assert url.host == 'google.com'
assert url.schema == 'https'
Features
TODO
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.0.1 (2019-11-14)
First release on PyPI.
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
chibi_requests-0.3.2.tar.gz
(13.2 kB
view hashes)
Built Distribution
Close
Hashes for chibi_requests-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54b55e1d67b30fd335c17121809f231f2bb3b20a6023bf86eb8246485719e8c6 |
|
MD5 | 89271972ea3db8669548a2325b551f10 |
|
BLAKE2b-256 | df98c163a2860639a12843324754830f59f49e6f813d0f17a83b46e83ddcd280 |