mavnt / pyghimporter

Import Python modules straight from GitHub!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pyghimporter

Import Python modules straight from GitHub!

Install

python3 -m venv venv
source venv/bin/activate
pip install git+https://github.com/mavnt/pyghimporter

Example

from pyghimporter import github

github(
    "mavnt",  # gh user
    "pyguess",  # gh repository
    "9cac4d51bddf91553c17c81a4c2781b285efbf97",  # specific commit or branch, default "master"
    "from pyguess import pyguess",  # import statement, default f"import {module}"
    force=True,  # force reinstallation even if .zip module file is found or import attempt does not fail
)
github("mavnt", "d", "master", "from d import d")
github("mavnt", "with_colors", "master", "from with_colors import *")

if __name__ == "__main__":
    with color(red):
        a = 1
        b = 2
        print(d(a, b, c=3))
        print(pyguess(str(a)))

About

Import Python modules straight from GitHub!

License:MIT License


Languages

Language:Python 100.0%