Skip to main content

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)

Uploaded Source

Built Distribution

fractif_http-0.0.7-py3-none-any.whl (6.6 kB view hashes)

Uploaded Python 3

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