Saravanan666/pypi-org huggingface dataset:
Package: bitbootpy
BitBootPy: Fully-Decentralized Peer Discovery For P2P Network FormationInspired and based on the BitBoot (Javascript) project:https://github.com/tintfoundation/bitbootBitBootPyis a Python library that enables fully-decentralized P2P network Peer Discovery and network formation. No centralized infrastructure is required to start or join a P2P network which usesBitBootPyfor Peer Discovery. If you're tempted to use WebRTC for P2P network formation, you should be aware that WebRTC does require a centralized Peer Discovery server.Key FeaturesPiggybacks on the BitTorrent networkMakes a special entry on the BitTorrent DHT (distributed hash table) to enable robust decentralized peer discovery for your network without the need for centralized servers. As long as the BitTorrent network is running, your network will be discoverble. Can be extended to leverage other DHTs if necessary.Self-HealingEnables networks to easily re-form even if all nodes go offline.Easy-to-useA simple API for creating and joining decentralized networksAsync supportSupports both synchronous and asynchronous operationHow it worksWhen you make a network using BitBoot / BitBootPy, you make an entry on the BitTorrent DHT with a unique key identifying your network. Anyone who wants to join your network then just has to search the BitTorrent DHT for that key, and then connect to your machine using the IP data contained in the DHT entry. Done and done. You now have a P2P network that is fully robust to all nodes going offline and does not require a central server for peer discovery.UsageTo use BitBoot, simply create an instance of the AsyncBitBoot class with a unique key, and call the announce and lookup methods to join the network and discover peers. Here's a simple example:frombitboot.async_bitbootimportAsyncBitBootasyncdefmain():bot=AsyncBitBoot("unique_key")info_hash=awaitbot.announce()found_peers=awaitbot.lookup(info_hash)print("Found peers:",found_peers)bot.stop()if__name__=="__main__":asyncio.run(main())For more examples and details on how to use BitBoot, see theexamplesdirectory.
Package: bitbot
BitBotPython3 event-driven modular IRC bot!Requirements$ pip3 install --user -r requirements.txtSetupSeedocs/help/setup.md.Github/Gitea web hooksI run BitBot as-a-service on most popular networks (willing to add more networks!) and offer github/gitea-to-IRC web hook notifications for free to FOSS projects. Contact me for more information!Contact/SupportCome say hi at#bitbot on freenodeLicenseThis project is licensed under GNU General Public License v2.0 - seeLICENSEfor details.
Package: bitbotxl
bitbotxlA Python module for the 4tronix Bit:bot XL.You might use this with the Visual Studio Code extension found athttps://github.com/oivron/microbit-extension-vscode. The extension is available fromVisual Studio Code Marketplace.Installationpip install bitbotxlUsageSee documentation and examples for the Bit:bot XL below.Seemicro:bit Micropython APIfor a complete documentation on how to use the micro:bit.ImportTo use this module in your Python script:from bitbot import *Bit:bot XL documentation/API# Set left/right bias to match motors.
# Direction: LEFT or RIGHT.
# Bias in %.
bias(direction, percent)# Move robot forward or reverse at speed.
# Direction: FORWARD or REVERSE.
# Speed in %.
go(direction, speed)# Move robot forward or reverse at speed for milliseconds.
# Direction: FORWARD or REVERSE.
# Speed in %.
# Duration in milliseconds.
goms(direction, speed, duration)# Rotate robot left or right at speed.
# Direction: LEFT or RIGHT.
# Speed in %.
spin(direction, speed)# Rotate robot left or right at speed for milliseconds.
# Direction: LEFT or RIGHT.
# Speed in %.
# Duration in milliseconds.
spinms(direction, speed, duration)# Sound a buzz for milliseconds.
# Duration in milliseconds.
buzz(duration)# Read line sensor.
# Directon: LEFT or RIGHT.
linesensor(direction)# Read ultrasonic distance sensor.
# Returns distance in cm.
sonar()# Stops the Bit:bot.
stop()ExamplesSimple examples on how to use the line sensor and the ultrasonic distance sensor. You need to add additional code to create complete scripts.Adjust the arguments for speed and duration according to your own preferences.Line sensor# Let Bit:bot follow a dark line.
if (bitbot.linesensor(RIGHT) == 1):
    bitbot.spinms(RIGHT, 10, 1) # Adjusts direction. Arguments need to have very small values.
elif (bitbot.linesensor(LEFT) == 1):
    bitbot.spinms(LEFT, 10, 1) # Adjusts direction. Arguments need to have very small values.
else:
    bitbot.go(FORWARD, 50)# Let Bit:bot drive between two dark lines.
if (bitbot.linesensor(RIGHT) == 1):
    bitbot.spinms(LEFT, 10, 1)
elif (bitbot.linesensor(LEFT) == 1):
    bitbot.spinms(RIGHT, 10, 1)
else:
    bitbot.go(FORWARD, 50)Sonar# Stop, reverse and spin the Bit:bot when it gets close to an object.
# The sonar() method returns the distance to the nearest object in cm.
bitbot.go(FORWARD, 50)
if bitbot.sonar() < 20:
    bitbot.stop()
    bitbot.goms(REVERSE, 50, 700)
    bitbot.spinms(RIGHT, 50, 200)
Package: bitbox02
BitBox02 python APIThis repository contains two packagesu2fhidbitbox02u2fhidThis is a small package that contains read/write primitives for u2fhid devices such as the
bitbox02.bitbox02In this folder is the Python API for communicating with the BitBox02 device.The foldergeneratedcontains files generated bypython-protobuf. Regenerate withmake.
Package: bitbucket2github
Bitbucket2GitHubBitbucket2GitHub is a simple tool to migrate your Bitbucket repositories to GitHubUsage$ pip install bitbucket2github
$ bitbucket2github --github-token=TOKEN --github-organization=ORGANIZATION --github-team=TEAM --bitbucket-username=USER --bitbucket-password=SECRET --bitbucket-organization=ORG -v --repos-to-migrate=REPO_NAME_1 --repos-to-migrate=REPO_NAME_2$ bitbucket2github --help
Usage: bitbucket2github [OPTIONS]

Options:
  --github-token TEXT            Your Github Token  [required]
  --github-organization TEXT     The organization to import to instead of the
                                 user

  --github-team TEXT             The organization team to give the repository
                                 to

  --bitbucket-username TEXT      Your Bitbucket Username  [required]
  --bitbucket-password TEXT      Your Bitbucket Password  [required]
  --bitbucket-organization TEXT  Your Bitbucket Organization
  --repos-to-migrate TEXT        Repositories you want to migrate.

                                 If not passed, the command will migrate all
                                 your repositories.

                                 You can pass this parameter as many times as
                                 needed

                                 e.g. --repos-to-migrate=REPO1 --repos-to-
                                 migrate=REPO2

  -v, --verbose
  --help                         Show this message and exit.
Package: bitbucket-api
#BitBucket-API[![Build Status](https://secure.travis-ci.org/Sheeprider/BitBucket-api.png)](http://travis-ci.org/Sheeprider/BitBucket-api)BitBucket-api is an ISC Licensed library, written in Python.Bitbucket has a REST API publicly available, this package provide methods to interact with it.
It allows you to access most repositories, services (hooks) and ssh keys related functionalities.##FeaturesAccess public user informationsAccess public or private repositories, tags or branchesCreate, update or delete one of your repositoryAccess, create, update or delete a service (hook)Access, create or delete an SSH keyDownload a repository as an archiveAccess, create, update or delete an issueAccess, create, update or delete an issue comment##InstallationTo install bitbucket-api, simply:$ pip install bitbucket-api##RequirementsBitbucket-api require [requests](https://github.com/kennethreitz/requests), [sh](https://github.com/amoffat/sh) and [requests-oauthlib](https://github.com/requests/requests-oauthlib)towork, but dependencies should be handled by pip.##Documentation
Documentation is available on [Read The Docs](https://bitbucket-api.readthedocs.org/en/latest/index.html).
Package: bitbucket-approver
Bitbucket ApproverThis is the Python implementation of bitbucket approver client.
The server ishereUsageInstallationpipinstallbitbucket_approverConfig fileYou need aconfig.tomlfile for configuration like below:token="YOUR TOKEN"server="Approver Server"proxy="socks5://localhost:1080"Start clientbitbucket_approver~/config.toml
Package: bitbucket-batch
bitbucket-batchis a command-line tool for making bulk access updates toBitbucketrepositories. It is useful in a corporate team situation where
a single company account exists for managing private repositories with each
team member having their own account with write access to these repositories.
When a new member joins or leaves the team, the process of manually adding or
removing write access to all of the company’s repositories can be tedious.bitbucket-batchallows you to make access updates to all of the company’s
repositories in a single command.InstallationAssuming you havesetuptoolsinstalled, the easiest method is to install
directly from pypi by running the following command:$ easy_install -U bitbucket-batchOtherwise you can downloadbitbucket-batchand install it directly from
source:$ python setup.py installUsageOnce installed, the commandbitbucket-batchshould be available which
can be run in the following format:$ bitbucket-batch repo_owner operation role userEach of the required arguments are:repo_owner: The Bitbucket username for the owner of the repositories the bulk update will be made to.operation: The operation to apply which is eitheraddorremove.role: The role to use for the operation which is eitherreader,writeroradmin.user: The Bitbucket username that the operation will be made for.For example, to add the userstephenmcdas awriterto all
repositories owned by the usercitrus, the command would be:$ bitbucket-batch citrus add writer stephenmcd
Package: bitbucketcli
“bitbucket” Command Line interface to bitbucket.org“bitbucket” is command line tool written in python-cliff.Installation:git clonehttps://github.com/yspanchal/bitbucket.gitcd bitbucketpython setup.py installorpip install bitbucketcliUsage:bitbucket –helpextra command helpbitbucket help commandex: bitbucket help repo createExample Commandshttps://github.com/yspanchal/bitbucket/wiki/Example-Commandshttp://pythonhosted.org/bitbucketcli
Package: bitbucket-code-insight-reports
bitbucket-code-insight-reportsUpload reports to BitBucket server for use with the Code Insights feature.Designed to be extensible, so it can be hooked to anything that outputs file paths, line numbers and errors.FeaturesReport failing lines from the output ofterraform fmt --diff -check -recursiveReport failing lines from the output ofgit diff(must be provided with an input file)Usageusage: bitbucket-code-insight-reports [-h] [--file FILE] -u USER [-p PASSWORD]
                                      --report_key REPORT_KEY --report_title
                                      REPORT_TITLE --report_desc REPORT_DESC
                                      --report_type
                                      {terraform,git-diff,custom} --base_url
                                      BASE_URL --project_key PROJECT_KEY
                                      --repo_slug REPO_SLUG --commit COMMIT
                                      [--status {PASS,FAIL}]
                                      [--annotations ANNOTATIONS]

Uploads information to code insights in BitBucket.

optional arguments:
  -h, --help            show this help message and exit
  --file FILE           Input file for report (not required for all report
                        types.

Authentication Options:
  -u USER, --user USER  User to authenticate with BitBucket
  -p PASSWORD, --password PASSWORD
                        Password to authenticated with BitBucket

Report Options:
  Options to configure the report

  --report_key REPORT_KEY
                        BitBucket key for report.
  --report_title REPORT_TITLE
                        Human readable title for report.
  --report_desc REPORT_DESC
                        Description for the report.
  --report_type {terraform,git-diff,custom}
                        Report type

BitBucket Configuration:
  Info to access the repository and PR

  --base_url BASE_URL   URL of the BitBucket server.
  --project_key PROJECT_KEY
                        BitBucket key for the project.
  --repo_slug REPO_SLUG
                        Name of repo in BitBucket.
  --commit COMMIT       Commit hash for the commit to upload the report to.

Custom Report Options:
  Arguments only for use with the custom report type.

  --status {PASS,FAIL}  Status of the report, PASS/FAIL.
  --annotations ANNOTATIONS
                        Annotations in a JSON string as shown in
                        https://docs.atlassian.com/bitbucket-
                        server/rest/5.16.0/bitbucket-code-insights-
                        rest.html#idm361726402736CreditsThis package was created withCookiecutterand thetomtom-international/cookiecutter-pythonproject template.Changelog0.0.1-dev (2019-06-20)First release on PyPI.
Package: bitbucket-distutils
WarningThis project is abandoned, and we recommend not to use this anymore.
Because PyPI andpipdisallows to download package distributions
from other than official PyPI for security reasons.IntroDistribute/setuptools/distutilscommand forBitbucket. You can use
Bitbucket downloads instead ofPyPIdownloads for release.To use this, follow the instruction.InstructionFirst of all your software must be packaged within the standard distribution
way: usedistutils,Distributeorsetuptools.  This package contains
an extension command for that.Then, add this package intosetup_requiresparameter of yoursetup()configuration (ofsetup.pyscript):setup(name='YourPackageName',
      version='1.2.3',
      ...,
      setup_requires=['bitbucket-distutils >= 0.1.2'])Now there will be the overwrittenuploadcommand for yoursetup.py:$ python setup.py upload --help
Common commands: (see '--help-commands' for more)

...

Options for 'upload' command:
  --bb-repository (-R)  Bitbucket repository name e.g. user/reponame
  --bb-username (-u)    Bitbucket username
  --bb-password (-p)    Bitbucket password

...As you can see there are--bb--prefixed options for the command.
If-u/--bb-usernameand--p/--bb-passwordare not present,
it shows the prompt.-R/--bb-repositoryis required.UploadUpload is very easy:$ python setup.py sdist upload -R user/reponame registerBy explained:sdistMakes the source distribution file.  If your package name isYourPackageNameand its version is1.2.3, and then its file name
becomesYourPackageName-1.2.3.tar.gz.upload-Ruser/reponameUploads the built source distribution file into your Bitbucket repository.
It does not mean that it will be version-controlled, but it will be simply
uploaded to its downloads page.registerUsing the Bitbucket download URL registers the package of this version
into PyPI.
The URL of PyPI page will behttp://pypi.python.org/YourPackageName/1.2.3Defaulting optionsYou can make default values for these options by specifying in thesetup.cfgconfiguration file.  For example, if you want to default--bb-repository,
makesetup.cfgfile like (hyphens becomes underscores):[upload]
bb_repository = user/reponameYou can make a shorthand alias as well:[aliases]
release = sdist upload registerAuthor and licenseIt is distributed under Public Domain.  Just do what you want to do with this.
Written byHong Minhee.You can checkout the source code from itsBitbucket Mercurial repository:$ hg clone https://bitbucket.org/dahlia/bitbucket-distutilsIf you found a bug, please report it to theissue tracker.
Package: bitbucket-helper
bitbucket-helperBitbucket-helper is a command-line utility for working with lots of bitbucket server projects and repositories. This handy helper allows you to clone or pull every bitbucket repository you have access too. Repositories are pathed under their parent project, making it easy to identify the source project.InstallationThe utility requires python3.7.pip install bitbucket-helperSetupThe first time you attempt to sync, you will get prompted to provide your bitbucket details. The tool supports both Bitbucket Server and Bitbucket Cloud.Bitbucket Server requires a read-only personal access token. To generate goto Bitbucket -> Manage account -> Personal Access Tokens.BitBucket Cloud requires an App Password if you use 2FA. The App needs to be granted read access.All configuration settings get stored in~/.bitbucket-helper.config. To reconfigure you can delete this file.Listing RepositoriesTo list all of the repositories, you have permission to access:bitbucket-helper repoThe command outputs the following quoted comma-separated values:"project_key","clone_uri"SynchronisingThe synchronisation function uses bitbucket APIs to get all accessible projects and repositories.
For each project, it will create a directory using its key. For each repository, we perform agit cloneor agit pullif we already have a local copy. After the pull, we prune and delete local branches that have been merged at the origin.Local directory structure:working_directory (~/bitbucket-server)proj1repo1repo2proj2repo1repo2bitbucket-helper syncPull requestsBitbucket helper can list pull requests across all of your repositories. By default it returns OPEN pull requests, you can also filter for pull requests in a specific state, e.g. ALL, OPEN, MERGED, DECLINED.bitbucket-helper pr --state=MERGEDGit log commandsBitbucket helper makes it easy to search for commits across all of your repositories using simple filters. Log commands operate on locally synched repositories, so remember to do abitbucket-helper syncfirst.You can find all commits after a specified date using:bitbucket-helper log --after=2020-03-02To search from commits between two tags:bitbucket-helper log --from_tag=1.9.0 --to_tag=1.9.1Create a Snyk Import FileSnyk created animport utilityto help import projects into BitBucket Cloud. The utility supports stable imports by pacing to avoid rate limiting and by implementing retries.The import tool requires an import configuration file that bitbucket-helper can generate for you.To generate an import configuration:orgid - Can be found inhttps://app.snyk.io/org/YOUR_ORG/manage/settingsintegrationid - Can be found in integrations menu for each SCMhttps://app.snyk.io/org/YOUR_ORG/manage/settingsbitbucket-helper snyk:import --owner <repositoryOwner> --orgid <snykOrganisationId> --integrationid <snykIntegrationId> --outfile /tmp/import-projects.jsonFind out moreYou can find out morehere
Package: bitbucket-hook-diffstat
Bitbucket hook diffstatOverviewBitbucket push webhook handler to generate a list of files changed on a push.It processes branch updates/branch creates events and extracts the file paths of the files whose content was changed in that event, including the removal or creation of the file itself.
In the case of a branch update event, it gets the changeset between the current HEAD of the branch and the previous HEAD of that branch.
In case the branch is created, it gets the changeset between the current HEAD of the branch and the HEAD of the main branch of the repository.
It uses Bitbucketdiffstat,repositories, andbranchesAPIs. It handles some basic retries on retyable HTTP response codes from BitBucket.
It aslo perform a basic validation by comparing the expected owner and repo details with the details recieved in the push event, but in addition one should take care of whitelisting Bitbucket public IPs on the server side to make that check efficient.Usagefrombitbucket_hook_diffstatimportprocess_bitbucket_push_eventsresult=process_bitbucket_push_events(push_payload,repo_owner,repo_name,bitbucket_user,bitbucket_password)# it might raise an Exception, please check `bitbucket_hook_diffstat/exceptions.py`result# Is a dict of a zero or more branch names - strings to the set of one or many file pathnames - strings.{'master':{'.gitignore'}}push_payloadis a Bitbucket repositorypush eventrepo_ownerandrepo_nameone can retrieve from the repository URLhttps://bitbucket.org/repo_owner/repo_namebitbucket_passwordis an "app password" andbitbucket_useris available as "Username" in Bitbucket profile settings. This user should be authorized to do Repositories Read.
Package: bitbucket-pipeline-runner
Bitbucket Pipeline RunnerTool to run Bitbucket Pipelines locally.Installationpipinstallbitbucket-pipeline-runnerBasic usageTo run a pipelinecd<project-directory>
pipeline-runnerrun<pipeline-name>To list available pipelinescd<project-directory>
pipeline-runnerlistEnvironment variablesbitbucket pipeline runner already sets allBITBUCKET_*enviromnent variables in the step's run enviromnent.
It will also source any.envfile in the current directory, for all project specific enviromnent variables.Artifacts and logsPersistent data like artifacts generated from your pipelines and execution logs can be found in your user's data directory.On Linux:${XDG_DATA_HOME:-~/.local/share}/pipeline-runnerOn macOS:~/Library/Application Support/pipeline-runnerCachesCaches defined in your pipelines are stored in your user's cache directory.On Linux:${XDG_CACHE_HOME:-~/.cache}/pipeline-runnerOn macOS:~/Library/Caches/pipeline-runner
Package: bitbucket-pipes-toolkit
Bitbucket Pipes ToolkitThis package contains various tools and helpers to make it more fun and easy for people to develop pipes. This includes improved colorized logging, shared data interface, array variables helpers and more.Installationpip install bitbucket-pipes-toolkitExamplesSimple pipe exampleimportosfrombitbucket_pipes_toolkitimportPipeclassMyPipe(Pipe):defrun(self):super().run()print("I'm a simple little pipe")# below is a simple schema for pipe variables.schema={'USERNAME':{'required':True,'type':'string'},'PASSWORD':{'required':True,'type':'string'}}pipe_metadata={'name':'My Pipe','image':'my-docker-image:latest'}# Set environment variables required in schema.os.environ['USERNAME']='user'os.environ['PASSWORD']='pwd'my_pipe=MyPipe(pipe_metadata=pipe_metadata,schema=schema)my_pipe.run()DocumentationFor more details have a look at theofficial documentation.
Package: bitbucketpy
bitbucketpyWIP Python package for interacting with Bitbucket Cloud's API.UsageYou'll need three items:EMAIL: The email address used to interact with Bitbucket.PASSWORD: An API key used to authenticate with Bitbucket.API_ENDPOINT: exhttps://api.bitbucket.org/2.0Interact with therepository APIimportbitbucketapi=bitbucket.API(WORKSPACE,EMAIL,PASSWORD)repository=api.get_repository(REPOSITORY_NAME)Get branches in repositorybranches=repository.branches()forbranchinbranches:print(branch.name)The latest commit on a branchcommit=next(branch.commits)Find commits ahead of masterfeature_branch=repository.branch('feature_branch_name')commits=[commitforcommitinfeature_branch.commits({'exclude':'master','pagelen':100})]print(f"feature_branch_name is{len(commits)}commits ahead of master")Find a tag in the repositorytag=repository.tag('1.0.0')Find pipelines for a branchpipelines=list(api.get_pipelines('REPO_SLUG',{'target.branch':'BRANCH_NAME','sort':'-created_on','pagelen':20}))