Metadata-Version: 2.4
Name: copilot_auth
Version: 0.1.2
Summary: Copilot authentication library to get GitHub and Copilot tokens
Home-page: https://github.com/bhachauk/copilot-auth.git
Author: Bhanuchander Udhayakumar
Author-email: bhanuchander210@gmail.com
License: MIT
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

Copilot Authentication: copilot-auth
-----------
[![PyPI version](https://badge.fury.io/py/copilot-auth.svg)](https://badge.fury.io/py/copilot-auth)
[![License](https://img.shields.io/pypi/l/copilot-auth.svg)](https://pypi.org/project/copilot-auth/)
[![Downloads](https://static.pepy.tech/personalized-badge/copilot_auth?period=total&units=none&left_color=grey&right_color=green&left_text=Downloads)](https://pepy.tech/project/copilot_auth)
[![coverage](https://img.shields.io/codecov/c/github/bhachauk/copilot-auth)](https://app.codecov.io/gh/bhachauk/copilot-auth)


### Prerequisite

- python>=3.13
- requests

```shell
pip install requests
```

### Installation

```shell
pip install copilot-auth
```


### Getting started

**Steps to fetch copilot github token :**

- Fetch Github Access token using device flow
- Fetch Copilot Github token using Github Access token

```python
import copilot_auth as ca

# Custom token handler to process the token
def token_handler(token):
    print(token)

# Fetch the github access token
ca.authenticate_github_access_token([token_handler])

# Fetch the copilot github token using the github access token
ca.authenticate_copilot_token([token_handler])

```
