Skip to main content

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

  • in a commandline:

  • py -m pip install githubtoolkit
    
  • in a python script:

  • 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 up
  • repo specifies the repository you want to upload to
  • token is your login method
  • Not 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 file

  • file_path is now used as the path your file is saved under on GitHub
  • Other 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


    Download files

    Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

    Source Distribution

    githubtoolkit-1.0.2.tar.gz (3.9 kB view details)

    Uploaded Source

    Built Distribution

    githubtoolkit-1.0.2-py3-none-any.whl (4.4 kB view details)

    Uploaded Python 3

    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

    Hashes for githubtoolkit-1.0.2.tar.gz
    Algorithm Hash digest
    SHA256 12d053a207956406e05c8de9636ea13c176611eb9f3edbe46f37224e4770cd0f
    MD5 e746cf2893d58f3d48c3ef71f0bd9365
    BLAKE2b-256 d7ba7b9cad2ac6901016e17046eabb2041f81ec9f8140e804e00412f593d7ed5

    See more details on using hashes here.

    File details

    Details for the file githubtoolkit-1.0.2-py3-none-any.whl.

    File metadata

    File hashes

    Hashes for githubtoolkit-1.0.2-py3-none-any.whl
    Algorithm Hash digest
    SHA256 ff04036692d832b1f6ffe6d08673bd3c7b1b5b5fca485f74acae0974fd5f4d5f
    MD5 8f92c62346341405ee91c88d1b0ec30e
    BLAKE2b-256 ac70a589d042db2b3ff7f939fe9a0e4734b0fd710dd488de1bd99dacae6754ac

    See more details on using hashes here.

    Supported by

    AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page