Simple, yet elegant, HTTP library. As like as Requests. Actually, it is based on requests package...
Project description
Fractif HTTP
Simple, yet elegant, HTTP library. As like as Requests. Actually, it is based on requests package...
from fractifhttp import FractifClient, URL
class Example(FractifClient):
BASEURL = 'https://example.com'
search = URL(r'/search')
api = URL(r'/api/v1')
def __init__(self, debug=True, *args, **kwargs):
super().__init__(self.BASEURL, debug, *args, **kwargs)
self.logger = Logger('example').logger
def get_search(self, query):
self.search.go(params={'q': query})
print(self.soup.title.text)
# Example Domain
def get_api(self):
self.api.go()
print(self.json)
# {'success': True}
Installation
Install fractif-http with pip
pip install fractif-http
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
fractif-http-0.0.7.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for fractif_http-0.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42330d45aa22854c162982249be23f28b8831971567a5b47b96774359e61d196 |
|
MD5 | ffd6ca6189e4a3d2a0028ebd03d521f3 |
|
BLAKE2b-256 | aac09e79c7d05baf70f6d2684520d2ff96d50fbd386ae0f4e578767af3b57430 |