Saravanan666/pypi-org huggingface dataset:
Package: aptos-sdk
Aptos Python SDKThis provides basic functionalities to interact withAptos. Get startedhere.Currently this is still in development and may not be suitable for production purposes.Note: The sync client is deprecated, please only start new projects using the async client. Feature contributions to the sync client will be rejected.RequirementsThis SDK usesPoetryfor packaging and dependency management:curl -sSL https://install.python-poetry.org | python3 -
poetry installUnit testingmaketestE2E testing and Using the Aptos CLIDownload theAptos CLI.Set the environment variableAPTOS_CLI_PATHto the full path the the CLI.make examples_cliWe of course allow you to do this a bit more manually by:First, run a local testnet (run this from the root of aptos-core):cargorun-paptos--noderun-local-testnet--with-faucet--faucet-port8081--force-restart--assume-yesNext, tell the end-to-end tests to talk to this locally running testnet:exportAPTOS_NODE_URL="http://127.0.0.1:8080/v1"exportAPTOS_FAUCET_URL="http://127.0.0.1:8081"Finally run the tests:makeexamplesNote: These end-to-end tests are tested against a node built from the same commit as part of CI, not devnet. For examples tested against devnet, seedeveloper-docs-site/static/examples/python/from the root of the repo.AutoformattingmakefmtPackage PublishingDownload theAptos CLI.Set the environment variableAPTOS_CLI_PATHto the full path the the CLI.poetry run python -m aptos_sdk.cliand set the appropriate command-line parametersGenerating typesThe Pythonopenapi-python-clienttool cannot parse references. Therefore there are three options:Use swagger-cli to dereference, gain a type explosion, and still have missing typesLive without missing typesWrite a pure python implementation with no autogenerated codeCurrently the team is moving forward with pure python, but leaves the following notes for the curious:npminstall-g@apidevtools/swagger-cli
swagger-clibundle--dereference../../../api/doc/v0/openapi.yaml-tyaml>openapi.yaml
python3-mopenapi_python_clientgenerate--pathopenapi.yaml
mvaptos-dev-api-specification-client/aptos_dev_api_specification_client/aptos_sdk/openapiSemantic versioningThis project followssemveras closely as possible
Package: aptos-sdk-fork
Aptos Python SDKThis provides basic functionalities to interact withAptos. Get startedhere.Currently this is still in development and may not be suitable for production purposes.Note: The sync client is deprecated, please only start new projects using the async client. Feature contributions to the sync client will be rejected.RequirementsThis SDK usesPoetryfor packaging and dependency management:curl -sSL https://install.python-poetry.org | python3 -
poetry installUnit testingmaketestE2E testing and Using the Aptos CLIDownload theAptos CLI.Set the environment variableAPTOS_CLI_PATHto the full path of the CLI.make examples_cliWe of course allow you to do this a bit more manually by:First, run a local testnet (run this from the root of aptos-core):cargorun-paptos--noderun-local-testnet--force-restart--assume-yesNext, tell the end-to-end tests to talk to this locally running testnet:exportAPTOS_NODE_URL="http://127.0.0.1:8080/v1"exportAPTOS_FAUCET_URL="http://127.0.0.1:8081"Finally run the tests:makeexamplesNote: These end-to-end tests are tested against a node built from the same commit as part of CI, not devnet. For examples tested against devnet, seedeveloper-docs-site/static/examples/python/from the root of the repo.AutoformattingmakefmtPackage PublishingDownload theAptos CLI.Set the environment variableAPTOS_CLI_PATHto the full path of the CLI.poetry run python -m aptos_sdk.cliand set the appropriate command-line parametersGenerating typesThe Pythonopenapi-python-clienttool cannot parse references. Therefore there are three options:Use swagger-cli to dereference, gain a type explosion, and still have missing typesLive without missing typesWrite a pure python implementation with no autogenerated codeCurrently the team is moving forward with pure python, but leaves the following notes for the curious:npminstall-g@apidevtools/swagger-cli
swagger-clibundle--dereference../../../api/doc/v0/openapi.yaml-tyaml>openapi.yaml
python3-mopenapi_python_clientgenerate--pathopenapi.yaml
mvaptos-dev-api-specification-client/aptos_dev_api_specification_client/aptos_sdk/openapiSemantic versioningThis project followssemveras closely as possible
Package: aptos-sdk-zzf
Aptos Python SDKThis provides basic functionalities to interact withAptos. Get startedhere.Currently this is still in development and may not be suitable for production purposes.Note: The sync client is deprecated, please only start new projects using the async client. Feature contributions to the sync client will be rejected.RequirementsThis SDK usesPoetryfor packaging and dependency management:curl -sSL https://install.python-poetry.org | python3 -
poetry installUnit testingmaketestE2E testingFirst, run a local testnet (run this from the root of aptos-core):cargorun-paptos--noderun-local-testnet--with-faucet--faucet-port8081--force-restart--assume-yesNext, tell the end-to-end tests to talk to this locally running testnet:exportAPTOS_NODE_URL="http://127.0.0.1:8080/v1"exportAPTOS_FAUCET_URL="http://127.0.0.1:8081"Finally run the tests:makeexamplesNote: These end-to-end tests are tested against a node built from the same commit as part of CI, not devnet. For examples tested against devnet, seedeveloper-docs-site/static/examples/python/from the root of the repo.AutoformattingmakefmtGenerating typesThe Pythonopenapi-python-clienttool cannot parse references. Therefore there are three options:Use swagger-cli to dereference, gain a type explosion, and still have missing typesLive without missing typesWrite a pure python implementation with no autogenerated codeCurrently the team is moving forward with pure python, but leaves the following notes for the curious:npminstall-g@apidevtools/swagger-cli
swagger-clibundle--dereference../../../api/doc/v0/openapi.yaml-tyaml>openapi.yaml
python3-mopenapi_python_clientgenerate--pathopenapi.yaml
mvaptos-dev-api-specification-client/aptos_dev_api_specification_client/aptos_sdk/openapiSemantic versioningThis project followssemveras closely as possible
Package: aptos-verify
Aptos VerifyAptos Verify is a Python library for verifying a module on Aptos BlockchainInstallationBefore install package, you need to setup Rust, Cargo and Aptos Cliinstall Rust and Cargo:https://learning-rust.github.io/docs/installation/curl--proto'=https'--tlsv1.2-sSfhttps://sh.rustup.rs|shinstall Aptos Cli:https://aptos.dev/tools/aptos-cli/install-cli/curl-fsSL"https://aptos.dev/scripts/install_cli.py"|python3Use the package managerpipto install aptos_verify.pipinstallaptos-verifyRun with docker by load image from folder dockerOption 1 Build docker: 
docker build -t aptos-verify-dk . 

Option 2 Load docker by image: 
docker load -i aptos-verify-dk.tar   

Start container: 
docker run -d -p 9998:9998 aptos-verify-dkUsageUse with CLIVerify with source code that's published onchain
aptos-verify -m 0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::admin

Verify with source code on github
aptos-verify -m 0x190d44266241744264b964a37b8f09863167a12d3e70cda39376cfb4e3561e12::liquidity_pool -vm github -git https://github.com/pontem-network/liquidswap

Verify with local path (source code path)
aptos-verify -m 0x190d44266241744264b964a37b8f09863167a12d3e70cda39376cfb4e3561e12::liquidity_pool -vm local -path /<local_path>

Result:
**************** Rule: Compare bytecode between published bytecode and published source code onchain *****************
                    Result: True
                    Error Code: 0
                    Message: Verify success
                    Exception Class:Use with sdkfromaptos_verify.mainimportstart_verifyfromaptos_verify.schemasimportVerifyParamsimportasyncioasyncdefmain():print('Start verify module: 0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::admin')rs=awaitstart_verify(VerifyArgs(module_id='0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::admin',))print('Result:')print(rs)if__name__=="__main__":asyncio.run(main())Use with docker and APIhttp://localhost:9998/verify/<module_address>

Example: 
http://localhost:9998/verify/0x8d2d7bcde13b2513617df3f98cdd5d0e4b9f714c6308b9204fe18ad900d92609::admin

Result:
{"message":"success","data":[{"title":"Compare bytecode between published bytecode and published source code onchain","message":"Verify success","is_skip":false,"error_code":0,"exeption_name":"","result":true,"traceback":"","error_message":""}]}Run testspytest -sContributingPull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.Error CodeList error codes  that returned from toolError CodeMessage0No Errors1Package Not Found2Module Not Found3Module Has No Source Code4Validation Error
Package: apt_package_mirror
A apt mirror tool that does staging to prevent breaking your mirror!RequirementsAn ubuntu mirror takes up about 1T worth of data currently. This tool also
puts about 10G of data in /tmp so that it can stage the indices.This tool uses rsync, please install it using your package manager.Checks the tool makesThis tool checks the md5sum of each Package file and checks the Package indices
to make sure each package exists before moving the Package indices into placeHow to use the toolCheck the example config file and change it to your needs, note the mirror you
mirror from must support rsync. Run the script using the followingpython apt_package_mirror/__main__.py config.yamlor install it using pip and run it using the followingpip install apt_package_mirror
apt_package_mirror config.yamlNoteThis tool only supports python2.7 right now, it might work with python3 but
I have not tested that.
Package: apt-preferences
Apt PreferencesDescriptionPython package to modify apt preferences files in line withhttps://manpages.debian.org/buster/apt/apt_preferences.5.en.html.I don't like using awk and sed for updating preferences cause it's got messier the bigger amount of preferences is connected to a package.
If regexes are used in packages names then it's even harder. This package along withreshould make more complex preferences scenarios easy to automate.And I wanted to learnLARKso that is also a big pron of the project.Table of ContentsInstallationUsageCreditsLicenseInstallationCreate virtual environmentmake venvActivate virtual environment. .venv/bin/activateInstall packagemake installUsagefrom apt_preferences.data_structures import AptPreference
from apt_preferences.render_preferences_files import render_preferences_files

# lets assume this is a parsed preferences file
my_prefs_l = [AptPreference(package="*", pin="release n=jammy", pin_priority=700, file_path="/etc/apt/preferences", explanations={})]

# we would like to change pin priority for one of file preferences
my_pref = my_prefs_l[0]

# pin priority is modified
my_pref.pin_priority = 100

# preference with modified pin priority is saved to the file
render_preferences_files(my_prefs_l)For more examples look into/examplesdirectory.Run examplepython examples/read_preferences.pyFeatures:Parse apt preferences' files into Python objects list.Generate new apt preferences' files based on Python objects list.Planned features:Support multiple pins in single preference.Comment out objects via AptPreference method.Limitations:If a line starts with#it will be ignored by the parser.The generator doesn't allow creating lines starting with#.CreditsMe, Myself and I.LicenseMIT License

Copyright (c) [2023] [Jakub Buczyński]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Package: apt-pro
apt-proA python package for better update and manage your debian packages.IntroductionWhen you run "apt list --upgradable" in your terminal, you find around 1000 upgradable packages (if you are using parrot os or kali linux like distibution). It hard to find your important package or security releases.For this solution, here is "apt-pro".DemoCompatabilityPython 3.6+ is required.Installationpipinstallapt-proorpip3installapt-proThen run it with:apt-pro-hTodo-ListPretty OutputUpdate and upgrade packages from HereAdd or Remove packages form listUse sqlite
Package: apt-repo
python-apt-repoPython library to query APT repositories.Examplefromapt_repoimportAPTSources,APTRepositoryurl='http://archive.ubuntu.com/ubuntu'components=['main','universe','multiverse','restricted']sources=APTSources([APTRepository(url,'xenial',components),APTRepository(url,'xenial-updates',components),APTRepository(url,'xenial-backports',components),APTRepository(url,'xenial-proposed',components)])print([(package.package,package.version)forpackageinsources.get_packages_by_name('docker.io')])[('docker.io','1.10.3-0ubuntu6'),('docker.io','1.13.1-0ubuntu1~16.04.2'),('docker.io','17.03.2-0ubuntu2~16.04.1')]API Documentation
Package: aptrs
APTRSAPTRS (Automated Penetration Testing Reporting System) is an automated reporting tool in Python and Django. The tool allows Penetration testers to create a report directly without using the Traditional Docx file. It also provides an approach to keeping track of the projects and vulnerabilities.PrerequisitesPython 3.8 and above (https://www.python.org/downloads/release/python-3810/)wkhtmltopdf 0.12.6 and above (https://wkhtmltopdf.org/downloads.html)InstallationThe tool has been tested using Python 3.8.10 on Kali Linux 2022.2/3, Ubuntu 20.04.5 LTS, Windows 10/11.Windows Installationgit clone https://github.com/Anof-cyber/APTRS.git
  cd APTRS
  install.batLinux Installationgit clone https://github.com/Anof-cyber/APTRS.git
  cd APTRS
  install.shRunningWindowsrun.batLinuxrun.shFeaturesDemo ReportManaging VulnerabilitiesManage All Projects in one placeCreate a Vulnerability Database and avoid writing the same description and recommendations againEasily Create PDF ReprotDynamicly add POC, Description and RecommendationsManage Customers and ComapanyScreenshotsProjectView ProjectProject VulnerabilityProject ReportProject Add VulnerabilityRoadmapImproving Report QualityBulk Instance UploadPentest MapperBurp Suite Extension IntegrationAllowing Multiple Project ScopeImproving Code, Error handling and SecurityDocker Support
Package: apt-search
apt-searchSearch Ubuntu packages.MotivationI needed a way to find the right package for missing header files.
I triedapt-file, but for some reason it was constantly complaining withE: The cache is empty. You need to run "apt-file update" first.The alternative was to search the Ubuntu packages in the browser, but I wanted a tool for the CLI.
So I had the idea to parse the HTML search result and give a nice terminal output.InstallationUsepiporpipxfor installation:pipinstall--userapt-search# orpipxinstallapt-searchUsageJust execute theapt-searchcommand with the filename you are looking for:apt-search--help# Usage: main.py [OPTIONS] FILENAME## Arguments:#   FILENAME  [required]## Options:#   --suite TEXT                    [default: jammy]#   --arch TEXT                     [default: any]#   --help                          Show this message and exit.
Package: apt-select
Find a fast, up-to-date Ubuntu Archive Mirror.FeaturesTests latency to mirrors in a given country’s mirror list atmirrors.ubuntu.com.3 requests are sent to each mirror, minumum round trip time being used for rank.Reports latency, status, and bandwidth capacity of the fastest mirrors in a ranked list.Status and bandwidth are scraped fromlaunchpad.Generatessources.listfile using new mirror.New mirror can be chosen from a list or selected automatically using the top ranked mirror (default).InstallationTarget most recent release:pip install apt-selector:pip3 install apt-selectTarget project master branch:pip install git+https://github.com/jblakeman/apt-select.gitor:git clone https://github.com/jblakeman/apt-select
python apt-select/setup.py installInvocation$ apt-select --help
usage: apt-select [-h] [-C [COUNTRY]] [-t [NUMBER]] [-m [STATUS] | -p]
                  [-c | -l]

Find the fastest Ubuntu apt mirrors.
Generate new sources.list file.

optional arguments:
  -h, --help            show this help message and exit
  -C [COUNTRY], --country [COUNTRY]
                        specify a country to test its list of mirrors
                        used to match country list file names found at mirrors.ubuntu.com
                        COUNTRY should follow ISO 3166-1 alpha-2 format
                        default: US
  -t [NUMBER], --top-number [NUMBER]
                        specify number of mirrors to return
                        default: 1
  -m [STATUS], --min-status [STATUS]
                        return mirrors with minimum status
                        choices:
                           up-to-date
                           one-day-behind
                           two-days-behind
                           one-week-behind
                           unknown
                        default: up-to-date
  -p, --ping-only       rank mirror(s) by latency only, disregard status(es)
                        cannot be used with -m/--min-status
  -c, --choose          choose mirror from a list
                        requires -t/--top-num NUMBER where NUMBER > 1
  -l, --list            print list of mirrors only, don't generate file
                        cannot be used with -c/--choose

The exit code is 0 on success, 1 on error, and 4 if sources.list already has the chosen
mirror and a new one was not generated.ExamplesGet the top mirror from the United Kingdom to generate a newsources.list::apt-select --country GBChoose from the top 3 mirrors, including those last updated a week ago::apt-select -c -t 3 -m one-week-behindFind the top 10 mirrors, output latency info only, and don’t generate newsources.list::apt-select -t 10 -p -lAfter new sources.list is generated in current working directory, backup and replace to update apt::sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup && \
sudo mv sources.list /etc/apt/Supported URI TypesCurrently,http,httpsandftpare supported./etc/apt/sources.listshould contain sources in the following format::[deb|deb-src] [http|https|ftp]://mirror.example.com/path [component1] [component2] [...]DependenciesPython HTML parser,BeautifulSoup.HTTP Requests library,requests.
Package: aptwe
aptweaptwe is a framework to create recursive descent parsers. It intends to define
parsers inside the Python syntax similarily to writing EBNF. For example:nested_lists_ = Parser('NestedLists')
list_contents_ = int_ >> str_(',') >> int_
list_ = (str_('[') >> list_contents_ >> str_(']'))[getitem(1)]
nested_lists_[...] = int_ | list_

nested_lists_.loads('[1,[2,3]]') # Returns [1,[2,3]]
Package: apt-wrapper
A shorter, simpler, and slightly saner interactive interface to theDebian/Ubuntu APTcommand-line tools.Note:This utility is not as useful as it once was because the apt command
has already incorported its headline features.
However, it is still more convenient in a number of ways,
so read on if you’d like.aptmay be thought of as a traffic cop
that directs commands to the appropriate tool,
automatically elevating itself with sudo if need-be.
It consolidates all commands fromapt-getandapt-cache,
and the most common fromaptitude, dpkg,dpkg-query,add-apt-repository, andapt-key.
It has a much narrower focus than “kitchen-sink” tools such aswajig.Hopefully this micro-project will make your life a tiny bit easier.Installationsudo pip install apt-wrapperor for a possibly more up-to-date version:sudo pip install https://bitbucket.org/mixmastamyk/apt/get/default.tar.gzUsageExamples:apt                         # List available commands.
apt add universe            # Invokes sudo automatically,
Password:                   # when necessary.

apt add ppa:who/foo
apt update
apt search foo
apt policy foo
apt install foo bar
apt purge foo
apt instdeb foo.deb
apt instdeb http://foo...   # new

apt who-owns `which tr`
coreutils: /usr/bin/trShortened commandsaptcan also handle shortened commands.
Add letters until it can be uniquely identified:apt clresults in:sudo apt-get cleanAliasesThere are a few aliases for common commands as well:apt in foo          # install foo
apt rm bar          # remove
apt se baz          # apt-cache search
apt ls boo          # list installed packages, optionally
                    # with pkg name or glob\* argument syntax.
apt dir             # dir (e.g. NT or ls -l) installed packages.LicenseLicensed under theGPL, version 3+.Release Notes1.18 - Forced off bitbucket, move to github.  Update metadata.1.15 - fix: instdeb download issue under Python3.1.12 - enh: Python 3 support, refactoring.1.11 - enh: rmrepo command to remove ppa’s.1.10 - enh: reorder messages, refactoring.1.09 - enh: addrepo can now enable standard repos, print commands by default.1.08 - enh: instdeb can now download and install from urls.1.07 - Fix auto elevate for instdeb.1.06 - Add ls and dir aliases and doc syntax.1.05 - Doc improvements.1.04 - Allow additional options to be passed thru w/o error.1.03 - Update readme with release notes and document new aliases.1.02 - Addwho-ownsalias forsearchfiles.1.01 - Addinalias forinstall.
Package: apubsub
APubSubSimple, single-purpose message service implementation.InstallationPython versin 3.7+ requiredJust install it with pip:pip install apubsubUsagefromapubsubimportServiceservice=Service()# Note that service is started in stand-alone process# so start it as early as possible to minimize resource pickling*service.start()classKlass:def__init__(self):self.sub=service.get_client()awaitself.sub.start_consuming()# subscriber should be startedself.pub=service.get_client()# if used only as publisher, it is not requiredasyncdefdo_smth(self):data=awaitself.sub.get(.1)# fetch received data with timeoutifdataisNone:print("No data received by subscriber")returnprint(data)asyncdefdo_smth_else(self):msg="some string data"awaitself.pub.publish("topic",msg)asyncdefuse_iter_get(self):asyncfordatainself.sub.get_iter():print(f"Data received:{data}")Check out more examples in tests
Package: apush
apush=====### A simple Apple push notification service provider in Python.Important: `Service` overrides `identifier` attribute of `Notification` object.Instead, errors include token.```pythonfrom apush import Service, Notification, ERROR_INVALID_TOKENtoken = 'hex-encoded token'.decode('hex')service = Service('/path/to/certificate.pem')notification = Notification(token, alert='A new notification', badge=1)service.send(notification)```For several notifications, use `queue` and `flush`.```pythonfor n in notifications:service.queue(n)service.flush()```Check for errors after sending notifications.```pythondef remove(token):'''Remove token from database.'''...for (status, identifier, token) in service.errors:if status == ERROR_INVALID_TOKEN:remove(token)```Check feedback service for invalid tokens.```pythonfor (timestamp, token) in service.feedbacks:remove(token)```