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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file fractif-http-0.0.7.tar.gz.

File metadata

  • Download URL: fractif-http-0.0.7.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for fractif-http-0.0.7.tar.gz
Algorithm Hash digest
SHA256 53d66f6ff7bf4971205fe00ccec95ea0ffa4c884c812cd3baa64b9e3a1e6ec81
MD5 12c829b891aeefaf0b0a66bc8c0f2aaa
BLAKE2b-256 ac6f0810957d31814650530e28a1e2d864a64befab3e9ee0b8c5cc4502307fd3

See more details on using hashes here.

File details

Details for the file fractif_http-0.0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for fractif_http-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 42330d45aa22854c162982249be23f28b8831971567a5b47b96774359e61d196
MD5 ffd6ca6189e4a3d2a0028ebd03d521f3
BLAKE2b-256 aac09e79c7d05baf70f6d2684520d2ff96d50fbd386ae0f4e578767af3b57430

See more details on using hashes here.

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