Githubtoolkit
A Python module for interacting with GitHub
Installation
Using pip
You can install githubtoolkit via pip using
py -m pip install githubtoolkit
import os
os.system('py -m pip install githubtoolkit')
Usage
Uploading a file
You can upload a file using
githubtoolkit.upload_file_to_github(file, repo, token, branch, alias, comment)
Required
file specifies the path to the file you want to load uprepo specifies the repository you want to upload totoken is your login methodNot required
branch specifies the branch uploaded to (standard: "main")alias specifies the path the file is uploaded in (standard: file)comment adds a comment to your changes (standard: "Update "+filename_)Uploading file content directly
You can also directly upload the content of a file instead of letting the program do that.
Therefore, you can use
githubtoolkit.upload_content_to_github(content, file_path, repo, token, branch, comment)
None of these args have default values as they are normally called by the above function.
The values that aren't explained above are:
content is the content of the filefile_path is now used as the path your file is saved under on GitHubOther methods
Also, you can call the main() method to get a uploading agent.
The about() method returns information about your specific release.
You can call the main function from a commandline using
py -m githubtools
Contact
Use the following for contact / feedback information:
githubtools.about()["feedbackTo"]
Credits
This module is a fork of upload-content-to-github.
This means some of the credits go to bohachu.
More coming soon...
Release files for githubtoolkit 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| githubtoolkit-1.0.2.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| githubtoolkit-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:8.2 kB
Release files / githubtoolkit-1.0.2.tar.gz
| Download URL | githubtoolkit-1.0.2.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12d053a207956406e05c8de9636ea13c176611eb9f3edbe46f37224e4770cd0f
|
|
BLAKE2b-256 checksum How to use checksums |
d7ba7b9cad2ac6901016e17046eabb2041f81ec9f8140e804e00412f593d7ed5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / githubtoolkit-1.0.2-py3-none-any.whl
| Download URL | githubtoolkit-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff04036692d832b1f6ffe6d08673bd3c7b1b5b5fca485f74acae0974fd5f4d5f
|
|
BLAKE2b-256 checksum How to use checksums |
ac70a589d042db2b3ff7f939fe9a0e4734b0fd710dd488de1bd99dacae6754ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|