some tools for working with GitHub
Project description
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...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file githubtoolkit-1.0.2.tar.gz.
File metadata
- Download URL: githubtoolkit-1.0.2.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12d053a207956406e05c8de9636ea13c176611eb9f3edbe46f37224e4770cd0f
|
|
| MD5 |
e746cf2893d58f3d48c3ef71f0bd9365
|
|
| BLAKE2b-256 |
d7ba7b9cad2ac6901016e17046eabb2041f81ec9f8140e804e00412f593d7ed5
|
File details
Details for the file githubtoolkit-1.0.2-py3-none-any.whl.
File metadata
- Download URL: githubtoolkit-1.0.2-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ff04036692d832b1f6ffe6d08673bd3c7b1b5b5fca485f74acae0974fd5f4d5f
|
|
| MD5 |
8f92c62346341405ee91c88d1b0ec30e
|
|
| BLAKE2b-256 |
ac70a589d042db2b3ff7f939fe9a0e4734b0fd710dd488de1bd99dacae6754ac
|