Skip to content

Sample Python application showing how to make a GraphQL query.

License

Notifications You must be signed in to change notification settings

kenmuse/gh-graphql-query-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GraphQL Query in Python

This repository provides demonstrates how to make a basic GitHub GraphQL query using Python. The application will query the current API rate limit and return the results.

Setup & Configuration

If you're using GitHub Codespaces or Visual Studio development containers, then there's nothing special required. The container will automatically restore the needed packages.

If you're not using a development container, you will need to install Python 3. After that, use pip to install the project's dependencies:

pip3 install --upgrade pip
pip3 install --user -r ./requirements.txt

To run the application, you will need to create a GitHub Personal Access Token in your Developer Settings. This token will not require any privileges to be selected. If you modify the query, you will need to define appropriate privileges.

To run the sample, use the following command line. You will need to provide the token you created in the previous step.

python app.py {your-token}

About

Sample Python application showing how to make a GraphQL query.

Topics

Resources

License

Stars

Watchers

Forks