This library leverages the OpenAPI Specification to create a python client for the GitHub API. The OpenAPI specification contains metadata on all of the endpoints and how to access them properly. Using this metadata, we can construct a python client dynamically that updates automatically along with the OpenAPI Spec.

build_funcs[source]

build_funcs(nm='ghapi/metadata.py', url='https://github.com/github/rest-api-description/raw/main/descriptions/api.github.com/api.github.com.json?raw=true', docurl='https://docs.github.com/')

Build module metadata.py from an Open API spec and optionally filter by a path pre

This module created by build_funcs contains a list of metadata for each endpoint, containing the path, verb, operation id, summary, documentation relative URL, and list of parameters (if any), e.g:

from ghapi.metadata import funcs
GhMeta(*funcs[3])
GhMeta(path='/app/hook/config', verb='patch', oper_id='apps/update-webhook-config-for-app', summary='Update a webhook configuration for an app', doc_url='v3/apps#update-a-webhook-configuration-for-an-app', params=[], data=[['url', <class 'str'>], ['content_type', <class 'str'>], ['secret', <class 'str'>], ['insecure_ssl', <class 'str'>]], preview='')