Saravanan666/pypi-org huggingface dataset:
Package: gitlablib
Copyright (c) 2022 Jérémie DECOCK (www.jdhp.org)Web site:http://www.jdhp.org/software_en.html#gitlablibOnline documentation:http://gitlablib.readthedocs.orgExamples:http://gitlablib.readthedocs.org/gallery/Notebooks:https://github.com/jdhp/gitlab-lib-notebooksSource code:https://github.com/jdhp/gitlab-libIssue tracker:https://github.com/jdhp/gitlab-lib/issuesPython Client for GitLab on PyPI:https://pypi.org/project/gitlablibPython Client for GitLab on Anaconda Cloud:https://anaconda.org/jdhp/gitlablibDescriptionAn unofficial Python 3 client for the GitLab APINote:This project is still in beta stage, so the API is not finalized yet.DependenciesPython >= 3.0InstallationGnu/LinuxYou can install, upgrade, uninstall Python Client for GitLab with these commands (in a
terminal):pip install --pre gitlablib
pip install --upgrade gitlablib
pip uninstall gitlablibOr, if you have downloaded the Python Client for GitLab source code:python3 setup.py installWindowsYou can install, upgrade, uninstall Python Client for GitLab with these commands (in acommand prompt):py -m pip install --pre gitlablib
py -m pip install --upgrade gitlablib
py -m pip uninstall gitlablibOr, if you have downloaded the Python Client for GitLab source code:py setup.py installMacOSXYou can install, upgrade, uninstall Python Client for GitLab with these commands (in a
terminal):pip install --pre gitlablib
pip install --upgrade gitlablib
pip uninstall gitlablibOr, if you have downloaded the Python Client for GitLab source code:python3 setup.py installDocumentationOnline documentation:http://gitlablib.readthedocs.orgAPI documentation:http://gitlablib.readthedocs.org/en/latest/api.htmlExample usageTODOBug reportsTo search for bugs or report them, please use the Python Client for GitLab Bug Tracker at:https://github.com/jdhp/gitlab-lib/issuesLicenseThis project is provided under the terms and conditions of theMIT License.
Package: gitlab-management
Python Gitlab ManagementGitlab-management is python module that enables GitLab group configuration from code. By design it's intended to be setup to run on a schedule.How to UseGitLab-Management can be used from the command line or imported as a python module.Feature wise this module only process labels (create/add). over time features will be added. please see the milestones, issue and merge requests at the home page.For please refer to the docs.Python ModuleTo install runpip install gitlab-management. from there you will be able to use and extend the module as you see fit.CLIGitlab-management can be used via cli withgitlab-management, there is no requirement to prefix withpython3 -m, as the command is registered on install. To view all available options, use switch-hor--helpConfig FileThe configuration file for this module (config.yml) is a yml formated file that is required to be in the directory that the command is ran from.The layout of the yml fileGroup:Labels:-Group:Example1Name:BugDescription:"Itemsthatarebugsorbugrelated"Color:"#FF0000"-Group:-Example1-Example2Name:FeatureDescription:"Itemsthatarefeaturerelated"Color:"#00FF00"Group.Labelsis alistofdictfor each label that is to be created add a newdictto thelistunderGroup.LabelsGroup.Labels.#.Groupcan be a single string which is the name of an existing group that the user has access to as maintainer.Group.Labels.#.Groupcan also be alistof group names that the label will be added to.Docker containerfurther help can be found in thedocumentation.The docker images have been desigend to run the module directly as a command, where you only have to specify theCLIarguments.images are tagged for ease of idententification in accordance with the table below:Tagrepo branchWhen created{Version number}Git Tagevery git tag will create it's versiondevdevelopmentwhen a merge to development branch occurs or a git tag is created on a branch not master.stablemasterwhen a merge to master branch occursIssues, Feature Requests and BugsIf an issue or bug is found within the package (i.e. exception), pleasecreate an issue ticketusing the applicable issue template available at the time of ticket creation. If you would like to request a feature and are unable to contribute,please create an issueusing the feature issue template.ContributingContribution guide can be viewed in therepo.LicenceThe package licence can be viewed in therepo
Package: gitlab-manager
GitLab ManagerOverviewgitlab-manager is a Python script that provides a command-line interface for managing GitLab variables. It includes two subcommands: create_variable and create_variable_from_file. These subcommands allow users to create variables directly or from an environment file, simplifying the process of managing project variables on GitLab.UsageSubcommandscreate_variable
This subcommand creates a GitLab variable with the specified parameters.python gitlab_manager.py create_variable --api_url  --project_id  --private_token  --key  --value  --type  --masked --protected --environment_scope--api_url: GitLab API URL.--project_id: Project ID where the variable will be created.--private_token: Private Token for authentication.--key: Key for the variable.--value: Value for the variable.--type: Variable Type (default: 'env_var').--masked: Flag to indicate if the variable should be masked.--protected: Flag to indicate if the variable should be protected.--environment_scope: Environment Scope for the variable (default: '*').Examplegitlab_manager create_variable_from_file --api_url https://gitlab.example.com --project_id 123 --private_token ABC123 --key PathToFile --masked --protectedcreate_variable_from_file
This subcommand creates GitLab variables from an environment file.python gitlab_manager.py create_variable_from_file --api_url  --project_id  --private_token  --file  --type  --masked --protected --environment_scope--api_url: GitLab API URL.--project_id: Project ID where the variables will be created.--private_token: Private Token for authentication.--file: Path to the environment file containing variables.--type: Variable Type (default: 'env_var').--masked: Flag to indicate if the variables should be masked.--protected: Flag to indicate if the variables should be protected.--environment_scope: Environment Scope for the variables (default: '*').Examplegitlab_manager create_variable_from_file --api_url https://gitlab.example.com --project_id 123 --private_token ABC123 --key PathToFile --masked --protectedget_variables
This subcommand get GitLab variables from specific scope.python gitlab_manager.py get_variables --api_url  --project_id  --private_token  --environment_scope--api_url: GitLab API URL.--project_id: Project ID where the variables will be created.--private_token: Private Token for authentication.--environment_scope: Environment Scope for the variables (default: '*').Examplegitlab_manager get_variables --api_url https://gitlab.example.com --project_id 123 --private_token ABC123 ---environment_scope prod
Package: gitlab-migrate
gitlab-migrateMigration utility for GitLab serversUsagePreparationGet private token from source GitLab instanceGet private token from destination GitLab instanceCreate a configuration file (see examples/)Run one of the commands belowInformationgitlab-migrate-info config.yml --output-file=repos_src.csv
gitlab-migrate-info config.yml --output-file=repos_dst.csv --server=destinationMigration# testing
gitlab-migrate config.yml --noop

# migration
gitlab-migrate config.ymlDevelopmentgit clone https://github.com/kreczko/gitlab-migrate.git
cd gitlab-migrate
pip install -U -e .
Package: gitlab-mr-note
Post or Update Comments on Gitlab MRThe idea behind this project is to post content on the Gitlab MR which
dynamically updates as new commits are made. In order to do that, we add a
comment at the start of our content to identify the job the content is from.UsageGeneral Access Token fromSettings > Access Tokenswithapipermissions.Go toSettings > CI/CD > Variables > Add VariablesSet the key toGITLAB_PRIVATE_TOKENand value to key generated in first step.SetMaskflag and uncheckProtectflag.Create a test like followstest:stage:testscript:-pip install gitlab-mr-note-echo hello world | gitlab-mr-noteonly:-merge_requestsgitlab-mr-noteinfers the details from environment variables set in the CI.
For manual usage, pass the following args.Usage: gitlab-mr-note [OPTIONS]

Options:
  -s, --server-url TEXT     Server URL of gitlab instance
  -m, --mr-id TEXT          ID of the MR to comment on
  -p, --project-id TEXT     ID of the Project
  -j, --job-name TEXT       Job Name
  -t, --private-token TEXT  Private Token
  --help                    Show this message and exit.
Package: gitlab-ps-utils
GitLab PS UtilsGitLab PS utils is the foundational API and utilities libraries used by GitLab Professional Services.
To see the source code, project backlog and contributing guide,check hereInstallpipinstallgitlab-ps-utilsUsageThis library contains various utility modules and classes.
Refer to the repository source code to see available utility functions.Importing a utility functionfromgitlab_ps_utils.string_utilsimportstrip_numberstest_var="abc123"print(strip_numbers(test_var))Importing a utility classfromgitlab_ps_utils.apiimportGitLabApigl_api=GitLabApi()gl_api.generate_get_request("http://gitlab.example.com","token","/projects")Other resourcesPython-GitLabWe include a basic GitLab API wrapper class in this library. We will include specific API wrapper functions in the future.
Our wrapper class and specific wrappers were created whenpython-gitlabwas in a much earlier state,
so we continued to use our wrapper instead of switching to python-gitlabFor generic requests to the GitLab API, our wrapper is more lightweight than python-gitlab,
but python-gitlab is a great option for more complex API scripts
Package: gitlab-registry-usage-rest
GitLab-Registry-Usage-RESTIntroductionGitLab-Registry-Usage-RESTis a package that periodically collects repository information (names, tags, sizes) of a
GitLab registry server and offers the data via a securedRESTful HALapi.
For the initial authentication a LDAP server is needed. Subsequent queries are secured byJSON Web Tokens(JWT).InstallationThe latest version can be obtained from PyPI:pipinstallgitlab-registry-usage-rest
gitlab-registry-usage-rest--helpor from DockerHub:dockerrunsciapp/gitlab-registry-usage-rest:latest--helpor from the AUR for Arch Linux based systems:yay-Sgitlab-registry-usage-restUsageGitlab-Registry-Usage-RESTneeds a configuration file in order to run. The default path is/etc/gitlab_registry_usage_rest.confbut can be altered with the-ccommand line switch. To get started, you can rungitlab-registry-usage-rest--print-default-configand edit this default configuration to fit your environment.If you would like to use the docker repository, you can bind mount a local configuration file with the-vswitch:dockerrun-v"$(pwd)/gitlab_registry_usage_rest.conf:/etc/gitlab_registry_usage_rest.conf"sciapp/gitlab-registry-usage-rest:latestNote: Docker expects an absolute path for the local configuration file.The server offers these api endpoints:/auth_token: Accepts a request with basic auth (and valid LDAP credentials) and returns an auth token for further
api usage. All other endpoints only accept requests with a validBearerauthorization header:Authorization: Bearer <token>/repositories: Lists attributes of therepositoriescollection. Currently, only the timestamp of the last data
refresh is contained:{"timestamp":1521796487.7021387}/repositories/<repository_name>: Queries attributes of a specific repository:{"name":"scientific-it-systems/administration/gitlab-registry-usage-rest","size":39899199,"disk_size":39898911}/repositories/<repository_name>/tags: Endpoint for the collection of repository tags, currently without any content./repositories/<repository_name>/tags/<tag_name>: Lists attributes of a tagged image stored in a repository:{"name":"latest","size":39899199,"disk_size":39898911}Additionally, all api endpoints (except/auth_token) offer an_embeddedand a_linksattribute if requested with
the query string:?embed=true&links=trueInstead of a boolean value, the embed key can also take an integer number to only request a specific level of embedded
resources.Links can be used to easily navigate between related resources. Embedded resources are convenient to query a complete
hierarchy of resources with one GET request. Accordingly, the request/repositories?embed=truereturns all resources at once.
Package: gitlab-release-notes
Gitlab Release Notes GeneratorGenerate a changelog listing all merged requests since the last release of the repository.Do it online:Install and run locallyTo install:pip install gitlab_release_notesThen run:gitlab-release-notes --helpHerokuHeroku is setup in theherokubranch.make a new release ofgitlab_release_notesmanually deploy fromhttps://dashboard.heroku.com/apps/gitlab-release-notes/deploy/githubchoosing the heroku branch
Package: gitlab-release-notes-generator
gitlab-release-note-generator===============Special thanks togitlab-release. Most of the code used in this project is based on gitlab-release.This Python utility is used to generate a markdown changelog in the form:### Release note (2021-02-09 12:19:16)

#### [](#closed-issues)Closed issues

-   Adds initial gitlab yaml [(#1)]

#### [](#merged-merge-requests)Merged merge requests

-   Resolve "Adds initial gitlab yaml" [(#1)]It can be used in a.gitlab-ci.ymlstage like:::release:
  stage: release
  image: python3
  script:
    - pip3 install gitlab-release gitlab-release-notes-generator
    - Output=$(gitlab-release-notes-generator --private-token $GITLAB_ACCESS_TOKEN)
    - gitlab-release --description "${Output}" --zip "release-${CI_COMMIT_TAG}.zip" *
  only:
    - tagsSetting up the required private tokenThis tool requires you to put a copy of aPRIVATE_TOKENin a
secret CI variable for the project to give it access to post the files
back to the project.For this create a newPersonal Access Tokenathttps://gitlab.com/profile/personal_access_tokensand use that. (You
could also use your personal token fromhttps://gitlab.com/profile/account, but this isnot recommended.)Make sure you enableAccess your APIwhen creating the token. Thenameof the token is just for you to remeber what it's for, it wont
affeect operation.Add it to a secret variable calledPRIVATE_TOKENfor the project you’re
building athttps://gitlab.com/<user>/<project>/settings/ci_cd>.Usage::usage: gitlab-release-note-generator [-h] [--server SERVER] [--project-id PROJECT_ID]
                                          [--private-token PRIVATE_TOKEN] [-f FILE]============================= =====
optional arguments
============================= =====ArgumentDescription--server SERVERUrl of gitlab server(default:http://gitlab.com/)--project-idUnique id of project, available in Project. Settings/General(default:  $CI_PROJECT_ID)--private-tokenLogin token with permissions to commit to repo(default:  $PRIVATE_TOKEN)-f, --fileThe changelog file, which shall be written.(default: stdout)-h,--helpShow this help message and exit============================= =====
Package: gitlab-runner-api
An unofficial Python implementation of the API for creating customised GitLab CI runners.This package provides the basic functionality for registering aRunner.
This object can then be used to request aJoband communicate the log, status and artifacts back to GitLab.
No functionality is provided to execute the payloads defined in the.gitlab-ci.yml.This package was originally developed to supportLHCb’s Analysis Productionsby providing a CI runner that could submit jobs to LHCbDIRAC.
More details can be found in TODO.Registering a RunnerThe simplest way to register a newRunneris with the included command line tool:$ register-runner --help
usage: register-runner [-h] [--locked] [--maximum-timeout MAXIMUM_TIMEOUT] api_url token output_fn

positional arguments:
api_url
token
output_fn

optional arguments:
-h, --help            show this help message and exit
--locked              Lock the runner the to the current project
--maximum-timeout MAXIMUM_TIMEOUT
                        Maximum timeout set when this Runner will handle the job (in seconds)For example$register-runner"https://gitlab.cern.ch/""MY_REGISTRATION_TOKEN""my-runner-data.json "--lockedINFO:gitlab_runner_api:gitlab.cern.ch:Successfullyregisteredrunner6602(abcdefghij)INFO:gitlab_runner_api:gitlab.cern.ch:Successfullyinitialisedrunner6602where arguments can be found by navigating to the “CI/CD” page of the desired repository’s settings.Getting jobsAfter a runner has been registered it can be loaded from the.jsonfile and used to request jobs:fromgitlab_runner_apiimportRunnerrunner=Runner.load("my-runner-data.json")runner.check_auth()ifjob:=runner.request_job():print("Received a new job, starting executor")my_job_executor(job)else:print("No jobs are currently available")Executing jobsA minimal CI executor might run as follows:fromgitlab_runner_apiimportfailure_reasonsjob.log+=f"Starting job with id{job.id}for branch{job.ref}\n"do_clone_and_checkout(job.repo_url,job.commit_sha)success=run_tests(job)ifsuccess:job.log+="All tests ran successfully\n"job.set_success()else:# ANSI formatting codes can be used to enhance the CI logsjob.log+="\u001b[31mJob failed!!!\u001b[0m\n"job.set_failed(failure_reasons.ScriptFailure())See the referenceJobdocumentation for the full list of available properties.Persisting jobsFor long running jobs it may be desirable to persist the job object between calls.
This can be done using a similar interface to thepicklemodule in the Python standard library:job_data=job.dumps()fromgitlab_runner_apiimportJobjob=Job.loads(job_data)Note:The job log is included in the persisted data therefore theJobobject cannot be persisted once and loaded multiple times without loosing the log messages.
Package: gitlab-search
gitlab-searchCommand line tool for searching for text terms across several GitLab(TM) projectsContentsDescriptionFeaturesInstallationUsageDescriptionThis tool let's you perform a full text search across your personal projects, your group projects and/or public projects of any user on GitLab (TM).GITLAB is a trademark of GitLab Inc. in the United States and other countries and regionsNote: This is not an official tool from GitLab and the author has no affiliation with GitLab Inc.FeaturesSearch for occurrences of a text term across all files of all projects known to a userMatches are given with exact location and link to file on GitLabSearch personal projects and group projectsSearch public projects of other usersLimit search to personal projects or groupsExclude specific projects from searchLimit search to files with specific extensionsSearch for several terms in the same runWorks with custom gitlab domainInstallationYou can install this tool from PyPI with the following command:pipinstallgitlab-searchUsageTo use this tool you need a private API token, which you can create on the GitHub profile page.To run a search over all your projects for the termkalkokenyou can enter:github-searchkalkokenNote: The tool will search all personal projects and known group projects by default. You can change the scope of what projects are searches through command line arguments.When you start the command for the first time it will run setup, e.g. to configure your token. The configuration will be saved and re-used the next time you use the command. If you want to update your configuration your can setup again any time list this:github-search--setupHint: gitlab-search will store the configuration in the home directory of the current user in the file.gitlabsearch.You can get a full overview of the command syntax with:github-search-h
Package: gitlabsolute
gitlabsoluteHelper and convenience scripts to help with common GitLab actions.InstallationYou can install the latest version from PyPI package repository.python3-mpipinstall-UgitlabsoluteLicenseThis project is licensed under the MIT License - see theLICENSEfile for details.LocationsDocumentation:https://gitlabsolute.docs.twiddle-z.ovhWebsite:https://gitlab.com/twiddle-z/gitlabsolutePyPi:https://pypi.org/project/gitlabsolute
Package: gitlab-stats
Get to the gitlab API and generates a report based on the pipeline
builds. Creates a report for the pipelines of the last two weeks. (On
the assumption that there are less than 100 push per 2 weeks)InstallationInstall via pip using:pipinstallgitlab_statsLocal install with pip3:pip3install-e.In order to make it work:Create aGITLAB_TOKENenv variable with your access token.Get the project IDFor the script to work, you will need to get the project ID of your
gitlab project. It is a unique ID that is used by the gitlab REST API to
store your project information.Get it in[your project] > Settings > General > General project settingsGeneral project settingsHow to useWhen installed you should be able to run it like that:gitlab_stats<id>-u<yourgitlaburl>-p<yourproxy>Here is the help whengitlab_stats-h:usage:gitlab_stats[-h][-r][-uURL][-pPROXY]idgitlab_stats:Generateareportfromgitlab's pipeline metrics

positional arguments:
  id                    Put the id of the gitlab project

optional arguments:
  -h, --help                show this help message and exit
  -r, --report              Generate a csv report
  -u URL, --url URL         Put the url of your gitlab instance if different from
                            https://gitlab.com
  -p PROXY, --proxy PROXY   Add the url of your proxy like
                            'http://my.proxy.url:8083'You can save proxy withHTTP_PROXYor gitlab url withGITLAB_URL.DockerTo build the docker use:dockerbuild-tgitlab_stats.--build-argtoken="your token"--build-argproxy="your proxy"--build-arggitlab="gitlab url"To run the docker use:# Having set the token, the proxy and the url when building it:dockerrun-itexecgitlab_statsbashgitlab_statsproject_idImportant Note:You will need an access token set up as an environment variable to reach
your gitlab.To get an access token based on your personal credentials go to your
gitlab server[Account]->[Settings]->[Access Tokens]General project settingsThen give it a name and clickCreate personal access token.Save this token somewhere safe then in bash:exportGITLAB_TOKEN=<token>
Package: gitlab-superb-helper
# GitLab HelperThis is an open source tool to help manage GitLab.## Pre-requisitesInstall the dependencies
+ pip3 install -r requirements.txt## Scripts1. CloneUpdateGroup.py- Clones all the projects of a group in their respective path structurepython3 CloneUpdateGroup.py –url=”” –token=”” –userGroupId=”” basePath=””2. ConcederAcessoListaGrupoUsuariosListaProjetos.py- Grants access to a list of user groups in a list of projects:python3 ConcederAcessoListaGrupoUsuariosListaProjetos.py –url=”” –token=”” –userGroupIdList=”” –projectIdList=”” –nivelAcesso=”” –verbose=””3. ConcederAcessoFull.py- Grants access to all GitLab projects (repositories):python3 ConcederAcessoFull.py –url=”” –token=”” –userGroupId=”” nivelAcesso=”” –verbose=””4. ConcederAcessoGrupoUsuariosGrupoProjetos.py- Grants access to a group of users in all repositories from a group project:python3 ConcederAcessoGrupoUsuariosGrupoProjetos.py –url=”” –token=”” –projectGroupId=”” –userGroupId=”” –nivelAcesso=”” –verbose=””5. ConcederAcessoGrupoUsuariosSubgrupoProjetos.py- Grants access to a group of users in all projects (and subprojects) with a specific name group:python3 ConcederAcessoGrupoUsuariosSubgrupoProjetos.py –url=”” –token=”” –subGrupo=”” –userGroupId=”” –nivelAcesso=”” –verbose=””