Skip to main content

Package to make api calls

Project description

API_CALLS

  • This package makes it easy to make api calls in python by abstracing all the logic you'd otherwise use with other packages such as requests

  • This package requires requests 2.31.0 or later versions

  • Example usage below:

    
    from api_calls import ApiCalls
    
    
    class CatService(ApiCalls):
        base_url = "https://cat-fact.herokuapp.com"
        timeout = 500
    
        def get_random_cat_fact(self):
            response = self.make_request(
                "/facts/random", method="get", params={"amount": 5})
            return response
    
    
    data, error = CatService().get_random_cat_fact()
    
    

To install, run: pip install api_calls

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

api_calls-1.0.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

api_calls-1.0.1-py3-none-any.whl (3.0 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