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.
Regenerate the compact spec module gh_spec.py from GitHub’s OpenAPI description.
The GraphQL analog: build_gql_spec runs the standard introspection query and distills the answer (via ghapi.graphql.distill) into the compact tables shipped as ghapi.gql_spec, one line per type.
Regenerate the distilled GraphQL schema tables shipped as ghapi.gql_spec.
The generated gh_spec module contains the compact serialized form of the parsed spec (see SpecParser.save in fastspec): a plain-data spec dict with one entry per endpoint, e.g.: