Saravanan666/pypi-org huggingface dataset:
Package: github2pypi
github2pypiUtils to release Python repository on GitHub to PyPiUsagepipinstallgithub2pypi2. Editsetup.py.importgithub2pypi...withopen('README.md')asf:# e.g., ![](examples/image.jpg) ->#       ![](https://github.com/wkentaro/imgviz/blob/main/examples/image.jpg)long_description=github2pypi.replace_url(slug='wkentaro/imgviz',content=f.read(),branch="main")setup(...long_description=long_description,long_description_content_type='text/markdown',)Exampleshttps://github.com/wkentaro/labelmehttps://github.com/wkentaro/imgviz
Package: github3apps.py
github3apps.pyThis project is an extension to thegithub3.pyproject, with the purpose of enablingGitHub Applicationdevelopment.Using this library developers can access all of the special App endpoints as well as pull out agithub3.pyclient authenticated by a specific installation.UsageConnect to Github as ApplicationTo connect you need to pass the app id and the location of your app's private key.fromgithub3appsimportGithubAppgha=GithubApp(app_id,path_to_private_key)gha.set_user_agent('MyApp')gha.get_app()List Available InstallationsThis returns the list of installations IDs available to your application.fromgithub3appsimportGithubAppgha=GithubApp(app_id,path_to_private_key)installation_ids=gha.get_installations()Get Repositories Available to InstallationThis returns the list of repositories available to your specific installation.fromgithub3appsimportGithubAppgha=GithubApp(app_id,path_to_private_key)installation=gha.get_installation(installation_id)installation.get_repositories()Communicate with Github API as InstallationThis returns agithub3.pyclient already authenticated against a specific installation.fromgithub3appsimportGithubAppgha=GithubApp(app_id,path_to_private_key)installation=gha.get_installation(installation_id)gh=installation.get_github3_client()
Package: github3.py
github3.py is a comprehensive, actively developed, and extraordinarily stable
wrapper around the GitHub API (v3).Note: This library currently works with Python 3.7+ or pypy3. For older versions, please use version 1.3.0.Installation$ pip install github3.pyDependenciesrequestsuritemplatepython-dateutilPyJWTContributingPlease read theCONTRIBUTINGdocument.TestingYou can runpip install-e.[dev]to install the following before testing or
simplymaketest-deps. It is suggested you do this in a virtual environment.
These need to be installed for the tests to run.betamaxcoverageby Ned BatchelderBuild statusYou can find build statuses for different environments.GithubLicenseModified BSDlicenseExamplesSee thedocsfor more examples.TestingInstall the dependencies from requirements.txt e.g.:make testsAuthorIan Stapleton Cordasco (sigmavirus24)Contact OptionsFeel free to use thegithub3.pytag on Stack Overflow for any questions
you may have.If you dislike Stack Overflow, it is preferred that you send an email togithub3.py@librelist.com.You may also contact (viaemail) the author directly with
questions/suggestions/comments or if you wish to include sensitive data.
Package: github3-utils
Handy utilities for github3.pyDocsTestsPyPIAnacondaActivityQAOtherInstallationgithub3-utilscan be installed from PyPI or Anaconda.To install withpip:$python-mpipinstallgithub3-utilsTo install withconda:First add the required channels$condaconfig--addchannelshttps://conda.anaconda.org/conda-forge$condaconfig--addchannelshttps://conda.anaconda.org/domdfcodingThen install$condainstallgithub3-utils
Package: github-actions-cicd-example
Example repo: using GitHub Actions for CI/CD  for a Python projectThis is a minimal repo demonstrating the use of GitHub Actions for Continuous
Integration (CI) & Continous Deployment (CD) for a Python project.The GitHub Actions are:Tests:Automatically unit test code usingunittestfrom Python's
standard library.Code coverage:Generate code coverage reports usingcoverage.py. The reports are
automatically uploaded tocodecov. The
@codecov-commenter bot adds a comment to PR on code coverage status.Lint and format code:Lint usingpylint. Check code formatting usingblack. Check type hints usingmypy.Check docs build:CheckSphinxdocs build successfully.Deploy docs to GitHub pages:Automatically deploy docs to aGitHub Pages repoupon
merges tomainbranch.Upload release to PyPI:Publish the latest version of the package onPyPIwhen a new GitHub Release is created.Each of these actions is stored in a YAML file in the.github/workflowsdirectory.File system structureTBA...Push Token for Deploying DocsAction #5 requires setting up a Personal Access Token with full repo access via
the Developer Settings page. Store this token as an Actions secret under the
namePUSH_TOKENin the main repo (i.e. the repo where the docs source code is
held). See morehere.Useful resources on the topicmCoding'sYouTube videoon
using GitHub actions for automated testing (see associatedcode repo).Alex Damiani's YouTube videos on automated testing
[1],
[2] &
[3] and associated code repos:
[1]
[2], &
[3].librosais a real-world example ofpyproject.toml,setup.cfg&setup.pyworking together.Pharmpyuses Actions for building docs
then deploying them to a separate GitHub Pages repo.Vinod Kurup'sblog poston automating PyPI releases with GitHub Actions.
Package: github-actions-utils
Github Actions UtilsLog Utilsgithub group decoratorfromgithub_actions_utils.log_utilsimportgithub_group@github_group("foo")deffoo():codeWill produce in github action log▸ fooYou can use the function parameters as input like:@github_group("Running $cmd")defrun(cmd):codeWhen your code calls therunfunction will print user the value fromcmdparameter:run("nice command")▸ Running nice commandEven if the value is an object and you want a value from the object attribute:@github_group("Hello $(person.name)")defhello(person):codep=Person(name="Heitor")hello(p)▸ Hello Heitor
Package: github-action-template
GitHub Action templateThis project helps to createcustom GitHub actionswith Python 3.GitHub:Talentia-Software-OSS/github-action-python-templateFree and open source software:BSD licenseFeaturesThere are two ways to create a custom action: either by using JavaScript or
byproviding a Docker containerthat allows to use just any language.This project helps to code a Python 3.8+ custom action, by providing:acookiecuttertemplate to generate a boilerplate project including
Dockerfile, sample action code and metadataa Python package (this package) to serve as a lightweight framework for actions, used by our cookiecutter-generated
action
Package: github-activity
github-activityGenerate simple markdown changelogs for GitHub repositories written in Python.This package does two things:Given a GitHub org, repository, an initial git reference or date, use theGitHub GraphQL APIto return a DataFrame
of all issue and PR activity for this time period.A CLI to render this activity as markdown, suitable for generating changelogs or
community updates.Note: This is a really young tool so it might change a bit over time.InstallationThe easiest way to install this package is viapip:pip install github-activityUsageThe easiest way to usegithub-activityto generate activity markdown is to use
the command-line interface. It takes the following form:github-activity [<org>/<repo>] --since <date or ref> --until <date or ref>Seethe github-activity documentationfor more information.
Package: github-activity-visualiser
Github user activity visualiserdownload all user's public repositoriesfilter forks and mirrorsbuild a one year activity logrun a gource on itmore details (rus)UsageU needtokenfor this tool
todoRun from source$ git clone https://github.com/esemi/github-activity-visualiser.git
$ cd github-activity-visualiser
$ python3.9 -m venv venv
$ source venv/bin/activate
$ pip install poetry
$ poetry config virtualenvs.create false --local
$ poetry install
$ apt install gource
$ poetry run python github_activity_visualiser/visualiser.py --help
Package: github-app-access-token-fetcher
GitHub App Access Token FetcherUtility to get access tokens for a GitHub App.PrerequisitesThe GitHub App must be createdand installed.A private key must be generated (from the GitHub App settings UI) and its content should be written as binary data to
an AWS Secretsmanager secret.To set up the private key, do something like this (assuming the secret is created already):importboto3secret_arn="arn:aws:secretsmanager:us-east-1:1234:secret:my-secret-name"pem_file="/path/to/private_key.pem"client=boto3.client('secretsmanager',region_name=secret_arn.split(':')[3])withopen(pem_file,'rb')asf:client.put_secret_value(SecretId=secret_arn,SecretBinary=f.read())Installpipinstallgithub-app-access-token-fetcherUsageget-github-app-token --help

usage: get-github-app-token [-h] --app-id APP_ID --private-key-secret-arn PRIVATE_KEY_SECRET_ARN

Get a GitHub App token

optional arguments:
  -h, --help            show this help message and exit
  --app-id APP_ID       GitHub App ID
  --private-key-secret-arn PRIVATE_KEY_SECRET_ARN
                        ARN of the secret containing the GitHub App private keyExample:exportAWS_PROFILE=...# Something with access to the private key secret.get-github-app-token\--app-id1234\--private-key-secret-arnarn:aws:secretsmanager:us-west-1:4321:secret:abc-1234
Package: githubapps.py
githubapps.pyA Python wrapper for the Github Apps APIinstallingInstall and update using pip:pip install githubapps.pyexamplesA simple example.Syncimportgithubappsdefmain():withopen('env/private.key','rb')asf_private:private_key=f_private.read()withopen('env/app_id.key','r')asf_app_id:app_id=f_app_id.read()withopen('env/installation_id.key','r')asf_installation_id:installation_id=f_installation_id.read()client_secret=private_keyauth=githubapps.RequestsAuth(app_id,installation_id,client_secret)access_token=auth.get_access_token()print(access_token)if__name__=="__main__":main()Asyncimportgithubappsimportasyncioasyncdefmain():withopen('env/private.key','rb')asf_private:private_key=f_private.read()withopen('env/app_id.key','r')asf_app_id:app_id=f_app_id.read()withopen('env/installation_id.key','r')asf_installation_id:installation_id=f_installation_id.read()client_secret=private_keyauth=githubapps.AiohttpAuth(app_id,installation_id,client_secret)access_token=awaitauth.get_access_token()print(access_token)if__name__=="__main__":asyncio.run(main())
Package: githubAPy
Python package to easily use the GitHub API.InstallationInstall usingpip3 install githubAPyUsageImport the classfrom githubAPy import gapyCreate an object and pass the GitHub Access Tokena = gapy('<access_token_here>')Multiple actions are supporteda.mereturn your information in dict (JSON) format.a.user('<username>')return the information of a user.a.create_fork('<owner>', '<repository>')create a fork of the specified repository and returns url of the forked repository if fork successfully created else raises an error.a.update_with_upstream('<owner>', '<repository>')updates your forked repository master with the upstream master. ReturnsTrueif updated successfully else raises an error.More feature to be added in later versions.
Package: github-automation
github-automationThis tool will help you maintain and organize your GitHub project using an automation tool.Use caseIn case you work with GitHub projects, and maintain a board for your project this tool is for you.
As we offer a functionality of managing your board in GitHub project boards.
This is by searching for the issues or pull request you wish to include in the board (By a set of filter you provide) and placing them in the right place in your board for you - both in the correct column and the correct place within the column.The supported functionality is:Adding new issues or pull requests to your board.Moving issues or pull requests to the correct column of your project, with the priority in mind.Sorting your issues or pull requests within your existing columns by their priorities and creation times.Removing issues or pull requests that fail to meet your filters.In order to configure github-automation you will need to create an.inifile, here is an example:[General]
closed_issues_column = Done
merged_pull_requests_column = Merged
project_owner = ronykoz
repository_name = test
project_number = 1
priority_list = Critical,High,Medium,Low
filter_labels=bug
must_have_labels=test
cant_have_labels=not test
column_names = Queue,In progress,Review in progress,Waiting for Docs
column_rule_desc_order = Queue,Waiting for Docs,Review in progress,In progress

[Actions]
remove
add
move

[Queue]
issue.assignees = false

[In progress]
issue.assignees = true
pull_request.assignees = true

[Review in progress]
issue.assignees = true
issue.pull_request = true
issue.pull_request.review_requested = true
pull_request.review_requested = true

[Waiting for Docs]
issue.assignees = true
issue.pull_request = true
issue.pull_request.review_requested = true
issue.pull_request.review_completed = true
issue.pull_request.assignees = ronykozWhile the General and Actions sections must be in the.inithe rest of the sections are dynamic, and each represents the rules for each of your columns.
The keys listed in the column section are the attributes of the classes which represent the issue or pull request you are working on. For a more detailed explanation please clickhereGitHub ActionsIn order to use this in a github action please follow thisdocumentation.UsageThere are three options to run the tool:Configure an.inifile like described above and then using thegithub-automation manage -c <path to ini>command or thewehbhook-managecommand which is used for events.Import the code and create some more custom rules for your self, like importing issues from another board(FYI this will be added to the tool as well).GitHub actions - In order to use this in a github action please follow thisdocumentation.TokenIn any solution you will have to set an envioroonment variableGITHUB_TOKENwhich is the token you will generate in order for the tool to connect to your GitHub project.
Although we do offer the option to pass that along with your client object while taking the API option(Usage case number 2).
Package: github-avatar-dl
A python module that will allow users to download GitHub avatar imagesInstallation:pip install github-avatar-dlRequired Arguments:Two arguments are required to download the image:userandfilenameuseris the username of the GitHub account.filenameis the file that you want to download the image to.Usageimport github_avatar_dl as ghgh.download_avatar('mehtaarn000', 'image.jpg')A new image file should appear with the Avatar of the GitHub user.
Package: github-backup-tool
github-backup-toolBIG NOTE: This is a work-in-progress.A crunchy tool for backing up repositories of multiple specified GitHub organizations.What does it do?It will backup all Git repositories it has access to.What does it not do?At this moment, it will not back up:IssuesCommentsHooks...Eventually, backing up of these will be implemented.How to use?Set up a GitHub token, with a "repo" scope.Configure theconfig.yamlfile accordingly.Set up your running environment either via a virtualenv or distribution packages:virtualenv:Create a Python virtual environment viavirtualenv venvActivate yourvenvviasource venv/bin/activate(Consider the shell you are using, and adjuct this step accrodingly.)Install viapip install github-backup-tooldistribution packages:GitPython,GitPython@RepologyPyGithub,PyGithub@RepologyPyYAML,PyYAML@RepologyRungbt -c yourconfig.yaml.TODOs:Backup abandoned commits in master as a separate branch if commits were pushed to origin forcefullyBackup issuesBackup hooksBackup information of users, belonging to an organizationConfiguration: allow for ignoring of certain repositoriesBrainstorm about more ideas as to what to back up
Package: github-binary-upload
GitHub Binary UploadIntroductiongithub-binary-uploadis a script for creating GitHub releases from Git tags with attached assets.InstallationFrom PyPI:python3-mpipinstallgithub-binary-uploadSelf-contained executables for Linux x86_64 with glibc >= 2.17 (any recent Linux distribution) and macOS High Sierra
and newer are available on thereleases page.AUR package for Arch Linux users:python-github-binary-uploadUsageAfter installation you can rungithub-binary-upload:usage: github-binary-upload [-h] [-g GITHUB_SERVER] [-c CREDENTIALS_FILE] [-l]
                            [-n] [-u USERNAME] [-V]
                            [project] [tag] [assets [assets ...]]

github-binary-upload is a utility for publishing releases from tags with attached files on GitHub.

positional arguments:
  project               GitHub project in the format "<user>/<project name>"
  tag                   tag that will be published as a release, ignored if '
                        --latest' is given
  assets                files that will be attached to the release

optional arguments:
  -h, --help            show this help message and exit
  -g GITHUB_SERVER, --github-server GITHUB_SERVER
                        GitHub server hostname (default: github.com)
  -c CREDENTIALS_FILE, --credentials-file CREDENTIALS_FILE
                        path to a file containing username and password/access
                        token (on two separate lines, default: ~/.github-
                        binary-uploadrc)
  -l, --latest          get the latest tag from the GitHub API
  -n, --dry-run         only print which releases would be published
  -u USERNAME, --user USERNAME
                        user account for querying the GitHub API; the password
                        is read from stdin
  -V, --version         print the version number and exitExampleRungithub-binary-upload-uExampleUser-lExampleUser/ExampleProjectMyFirstAsset.zipMySecondAsset.whlto create a release from the latest tag in the GitHub projectExampleUser/ExampleProject. The filesMyFirstAsset.zipandMySecondAsset.whlwill be attached as downloadable files.github-binary-uploadcan be called multiple times on the same tag. The release will be recreated each time. This is
especially useful to CI pipelines which can run more than once.Python APIgithub-binary-uploaddefines a functionpublish_release_from_tagwhich can be called from Python code:fromgithub_binary_uploadimportpublish_release_from_tagpublish_release_from_tag(project,tag,assets,github_server,username,password,dry_run)IftagisNone, the latest tag will be converted to a GitHub release.dry_runis an optional parameter which
defaults toFalse.ContributingPlease openan issue on GitHubif you experience bugs or
miss features. Please consider to send a pull request if you can spend time on fixing the issue yourself. This project
usespre-committo ensure code quality and a consistent code style. Runmakegit-hooks-installto install all linters as Git hooks in your local clone ofgithub-binary-upload.
Package: githubbot
# githubBotThis project tries to implement a robot that is capable of automate labeling newly added issues to given repository.## Getting startedAt first you need to have an account on github.com and this account needs to be added as a collaborator for targeted repository.Seccondly, you need to generate a security token for this account.This token needs to be copied to the authconfig file. By default the name of this file is "auth.cfg", but feel free to name it your way (name of your file then needs to be passed to the app through a parameter --authfile)Default name of used token in this app is "tokenRobot". If you need to use multiple robot accounts for multiple repositories, you can add another tokens and pass suitable token name as a parameter at the start of this application.Down below is an example of the authconfig file```[github]tokenRobot = <github_token>yourNameOfToken = <github_token>```## Parameters* **--authfile** - Relative or absolute path to your authorization configure file. Default value is "auth.cfg"* **--configfile** - Relative or absolute path to your application configure file. Default value is "configFile.cfg"* **--timeout** - Number of secconds for checking new issues. Default value is 30 secconds* **--tokenname** - Name of token in authorization configure file. Default value is "tokenRobot"* **--repoowner** - Owner of the repository you would like to label issues.* **--repository** - Name of repository for automatic labeling.* **--defaultlabel** - Default label for not resolved issues. Default value is "NeedsLabel", but at the same time it needs to be correctly configured in the configure file.* **--superswitch** - Indicator whether to label issues, pull_requests or both.* **0** - Label issues and pull_requests* **1** - Label issues only* **2** - Label pull_requests only## Run```githubbot.py console [your_parameters]githubbot.py web [your_parameters]```or```python -m githubbot.py console [your_parameters]python -m githubbot.py web [your_parameters]```
Package: github-bot-api
github-bot-apiAPI for creating GitHub bots and webhooks in Python.Note: If you want to make use ofGithubApp.app_client()orGithubApp.installation_client(), you
need to installPyGithub>=1.58.Quickstart (Webhook)Create a new Smee channel onhttps://smee.ioInstallsmee-client(e.g.yarn global add smee-client)Runsmee -u <SMEE_CHANNEL_URL> -P /event-handler -p 5000Create a Python script with the below contents and run itfromgithub_bot_apiimportEvent,Webhookfromgithub_bot_api.flaskimportcreate_flask_appdefon_any_event(event:Event)->bool:print(event)returnTruewebhook=Webhook(secret=None)webhook.listen('*',on_any_event)importos;os.environ['FLASK_ENV']='development'flask_app=create_flask_app(__name__,webhook)flask_app.run()Quickstart (Application)Create a GitHub App, including a private keySet theAPP_IDandPRIVATE_KEY_FILEenvironment variablesRun the following Python scriptimportosfromgithub_bot_apiimportGithubAppwithopen(os.environ['PRIVATE_KEY_FILE'])asfp:private_key=fp.read()app=GithubApp(user_agent='my-bot/0.0.0',app_id=int(os.environ['APP_ID']),private_key=private_key)print(app.app_client().get_app().owner)Combined Example# ...app=GithubApp(...)webhook=Webhook()@webhook.listen('pull_request')defon_pull_request(event:Event)->bool:client=app.installation_client(event.payload['installation']['id'])repo=client.get_repo(event['repository']['full_name'])pr=repo.get_pull(event['pull_request']['number'])pr.create_issue_comment('Hello from my own bot!')returnTrue# ...