A Python package used to interact with the GitHub RESTful API.
This package can be installed using the GitHub repository URL.
pip install git+https://github.com/ONS-Innovation/code-github-api-package.gitpoetry add git+https://github.com/ONS-Innovation/code-github-api-package.gitThis package can be imported as a normal Python package.
Import whole module:
import github_api_toolkitImport part of the module:
from github_api_toolkit import github_interfaceThis project uses pip for package management. Poetry was avoided to keep the package size small.
To develop/test the project locally, clone the repository then navigate to its root directory and run the following:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txtThis will create a virtual environment, activate it and install all the project dependancies into it.
To deactivate the virtual environment, use:
deactivatePlease view the MkDocs documentation for more information about the toolkit's classes and functions.
This package uses pytest. To run the tests for the project, use:
pytestAll tests should pass.
This project uses MkDocs for documentation which gets deployed to GitHub Pages at a repository level.
For more information about MkDocs, see the below documentation.
There is a guide to getting started on this repository's GitHub Pages site.