clienter

Build


Keywords
requests, httpx, rest, api, http
License
Unlicense
Install
pip install clienter==0.0.1

Documentation

Clienter

Build Status codecov Codacy Badge standard-readme compliant

Build clients for REST APIs fast!

Table of Contents

About

I was tired of having to write boilerplate/custom clients for every REST endpoint available on the web. So, I decided to create something that do it for me. Here it is:

import httpx
from clienter import Clienter


class GitHub(Clienter):
    def repos(self, owner, repo):
        """ GET /repos/{}/{} """


github = GitHub('https://api.github.com', httpx)
repo = github.repos('meyer1994', 'clienter').json()
print(repo)

# Output:
# {
#     'full_name': 'meyer1994/clienter',
#     'private': False,
#     ...
# }

Note that we pass the client we want to use to the object constructor. In this example, we are using httpx. It works with requests as well.

Install

This project has no requirements :)

Thanks

This project was inspired by the OpenFeign project.