Skip to main content

a small python library to get code from github repositories.

Project description

Get code from GitHub

pypi CodeFactor

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

How to install

Classes/GetCode

functions/get_code

functions/async_get_code

2023, version 0.2.1

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

get_github_code-0.2.1.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

get_github_code-0.2.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file get_github_code-0.2.1.tar.gz.

File metadata

  • Download URL: get_github_code-0.2.1.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-71-generic

File hashes

Hashes for get_github_code-0.2.1.tar.gz
Algorithm Hash digest
SHA256 420b018cfbfb2ef3b7e429214349e02a799ac8c3c393c5735b38cee9d09340a3
MD5 3def6f109b20a4d7f7cc7d0b7bebff94
BLAKE2b-256 c62f847b366961ff7963e6f6db8e86d834d155ee868d25cf09ae231fc4f644a4

See more details on using hashes here.

File details

Details for the file get_github_code-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: get_github_code-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.6 Linux/5.15.0-71-generic

File hashes

Hashes for get_github_code-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fac887e3e6b09d8825a64fec128cd4f6411cf21997510d5e5777eaf8c065fe43
MD5 ad2ede628d48fcc3f3c97f9742ad4f69
BLAKE2b-256 e9e18e3f11f8672fed20989acc0b0fca3e29be16be0f4c9f888b1a9ead0f580e

See more details on using hashes here.

Supported by

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