Skip to content

Instantly share code, notes, and snippets.

View DavidMStraub's full-sized avatar

David Straub DavidMStraub

View GitHub Profile
@DavidMStraub
DavidMStraub / gist:9ea640f84c84e27546020147edd08ba5
Created August 1, 2025 19:29
Upload a file to a Github repository using the Github API
#!/usr/bin/env python3
"""Upload a file to a Github repository using the Github API.
Requirements:
- Install the `httpx` and `click` libraries: `pip install click httpx`
- Set your GitHub token, repository owner, and repository name in the script.
- Get a GitHub personal access token with permissions to write repo contents
(https://github.com/settings/personal-access-tokens)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
[
{
"/systemStates": "not found"
},
[
{
"id": "/dhwCircuits",
"type": "refEnum",
"references": [
{
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.