a small python library to get code from github repositories.
Project description
Get code from GitHub
this is a small python library to get code from github repositories
How to install
pip3 install get_github_code
Usage
is easy to use
from get_github_code import get_code
code = get_code(
user="Vlad2030",
repo="get-code-from-github",
branch="main",
file_path="VERSION",
)
print(code)
# 0.2.1
or asynchronous
import asyncio
from get_github_code import async_get_code
async def main() -> None:
code = await async_get_code(
user="Vlad2030",
repo="get-code-from-github",
branch="main",
file_path="VERSION",
)
print(code)
asyncio.run(main())
# 0.2.1
additionally you can through the class by calling property
import asyncio
from get_github_code import GetCode
file = GetCode(
user="Vlad2030",
repo="get-code-from-github",
branch="main",
file_path="VERSION",
)
print(file.get_code)
# 0.2.1
async def main() -> None:
file = GetCode(
user="Vlad2030",
repo="get-code-from-github",
branch="main",
file_path="VERSION",
)
print(file.async_get_code)
asyncio.run(main())
# 0.2.1
Documentation
2023, version 0.2.1
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
get_github_code-0.2.1.tar.gz
(16.4 kB
view hashes)
Built Distribution
Close
Hashes for get_github_code-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fac887e3e6b09d8825a64fec128cd4f6411cf21997510d5e5777eaf8c065fe43 |
|
MD5 | ad2ede628d48fcc3f3c97f9742ad4f69 |
|
BLAKE2b-256 | e9e18e3f11f8672fed20989acc0b0fca3e29be16be0f4c9f888b1a9ead0f580e |