Saravanan666/pypi-org huggingface dataset:
Package: botlogging
BotLoggingBotLogging is a logging package for Discord bots. It allows bot developers to log to Discord channels along with the standard terminal console, providing an easy way to track events and errors.pipinstallbotloggingLogging LevelsThe logging interface is designed to simulate the standard Python logging levels:debug,info,warning, anderror.Debug / Info / WarningThe first three levels by default donotsend to Discord. However, settingsend=Trueprovides this.fromdiscord.extimportcommandsimportbotloggingtoken=""bot=commands.Bot(token)logger=botlogging.BotLogger(bot=bot,name="mybot")logging_channel=818657960038250216@bot.command(name="echo")asyncdefecho(ctx,*,input:str):awaitlogger.info("Executing echo command",send=True,channel=logging_channel)awaitctx.send(content=input)ErrorFor errors, the default is to send to Discord along with a traceback. Note,critical=Truewill add a mention to the message, so the guild owner will be notified directly.@bot.command(name="run")asyncdefrun(ctx):try:awaitsome_function()exceptExceptionase:awaitlogger.error("Could not execute some_function!",exception=e,context=context,channel=logging_channel,critical=True)awaitctx.send(content=input)ConsoleIf you just want to log to the standard logging console, you can still reference it with the bot logger. This is useful because it is not an async method and can be used in synchronous code.defsetup_bot_config(bot,logger):logger.console.debug("Loading bot config")# ...Delayed logsTo avoid rate limiting issues, you can delay log events using a delayed logger.fromdiscord.extimportcommandsimportbotlogginglogger=botlogging.DelayedLogger(bot=bot,name="mybot")then within your event loop, runlogger.register_queue()Custom embedsYou can override the embeds sent to Discord by passing in your own embeds.# create a custom embedembed=discord.Embed(description="Custom embed!")embed.add_field(name="Some custom field",value="some custom value")awaitlogger.info("Executing echo command",send=True,channel=logging_channel,embed=embed)Note: this still adds in base formatting to the embed such as color and title.
Package: botmaker
BotMaker client libraryInstallationpipinstallbotmakerRun testsmakevenvsourcevenv/bin/activateexportBOTMAKER_ACCESS_TOKEN={access_token}maketestRelease to PyPipipinstall-Usetuptoolswheeltwine
makerelease# PyPi will prompt you to log inUsageSend a message based on an existing templateimportbotmakerclient=botmaker.Client()# Will use the env var BOTMAKER_ACCESS_TOKEN# Send from '5215500000000' to '5215522222222'client.template_messages.create('5215500000000','5215522222222','template_name',template_param1='x',template_param2='y')
Package: botmerger
🔀 BotMergerBotMerger is a fully asynchronous Python framework designed as a messaging platform which allows Large Language Model
(LLM)-based chatbots to interact with each other in order to "merge" into more complex bots capable of fulfilling
non-trivial user requests.📦 Installationpipinstall-Ubotmerger🚀 QuickstartTODO💡 Philosophy🧩 Implement each skill as a separate botLet's consider our own version "GitHub Copilot" as an example. Here is how it could be roughly broken down into smaller
bots:A bot that lists files in a GitHub repositoryA bot that reads source code from a file in the repository and displays it in the "chat" (an internal chat between
bots)A bot that improves the code according to a given criteriaA bot that accepts code improvement requests from a user (via Discord, Telegram or maybe as CLI input), breaks
them down, delegates them to the appropriate bots from the list above and then reports back to the userA bot that occasionally asks the user for additional input in the middle of request processing should any of the
other bots require such input in order to fulfill their part of the requestand so on...🎭 Each "mini-bot" should be able to interact with the user directlyIf any of the bots require strictly formatted input in order to perform their part of the request (for example, the
bot that reads the source code from a file in a repository will require a specific file name as input), it should be
possible to provide such input in both strictly formatted and natural language forms (for example,{"filename": "src/main.py"}vssrc/main.pyvsthe main module; it would rely on the output of the "list repo files"
bot to translate free text into the actual file path).It is preferable that each of the bots that together comprise a more complicated bot is implemented this way. The
framework facilitates that by allowing developers to easily make any of these "mini-bots" face the user directly for
debugging purposes.🍭 Example projectsTODO
Package: bot-net
description: >-
Bot-Net is one of the most useful, powerful and complete offensive
penetration testing toolBot-NetOffensive penetration testing tool (Open Source)Bot-Net provides easy ways to execute many kinds of information gatherings and attacks.Fully Open SourceWritten in PythonContinuously updated and extendedFeaturesLocalhost Web GUISniffingWebsite crawlingWeb page parsingSQL injectionInjected database managementBrute force attacksCluster between other Bot-NetsMultiple asynchronous requestsMultiple targets managementUseful CTF featuresâ€‚ PyPI installationsudopip3installBot-NetRunGUI:Bot-Net -gCommand line:Bot-Net <arguments>DebugRun django (examples):Bot-Net --django runserverBot-Net --django helpBot-Net --django "help createsuperuser"Project layout[root]
  |
  |-- app/              # Main application package
  |    |
  |    |-- arguments/       # User input arguments parser (100%)
  |    |
  |    |-- attack/          # Attack modality package (0%)
  |    |-- defense/         # Defense modality package (0%)
  |    |
  |    |-- gui/             # Graphical User Interface package (100%)
  |    |
  |    |-- helpers/         # Helper methods package (100%)
  |    |
  |    |-- managers/        # Managers package
  |    |    |
  |    |    |-- cluster/        # Cluster managers package (0%)
  |    |    |-- crypto/         # Encryption managers package (70%)
  |    |    |-- injection/      # Injection managers package (60%)
  |    |    |-- parser/         # Parser managers package (100%)
  |    |    |-- request/        # Request managers package (70%)
  |    |    |-- sniffer/        # Sniffer managers package (95%)
  |    |
  |    |-- services/        # Services package
  |    |    |
  |    |    |-- logger.py       # Logger service (100%)
  |    |    |-- multitask.py    # MultiTask service (100%)
  |    |    |-- serializer.py   # PickleSerializer and JsonSerializer serivces (100%)
  |    |
  |    |-- storage/         # Storage directory
  |    |
  |    |-- env.py           # Environment variables management
  |
  |-- .env              # Environment variables
  |
  |-- Bot-Net.py    # Main executableLinksPyPI:https://pypi.org/project/Bot-NetGitHub:https://github.com/Abhayindia/BOT-NETAuthors[Abhay Chaudhary]
Package: botnium-plus
Python toolkits for RPA projects.loggingutility methodscc extensionsSampleimportBotniumPlusasbotimportBotniumPlus.loggerasloggerfromBotniumPlus.commonimport*fromclickniumimportclickniumascc,locatorlogger=logger.loggerbot.is_existing(locator.explorer.edit_name)# 判断是否存在bot.wait_appear(locator.explorer.edit_name)# 等待元素出现bot.try_click(locator.explorer.edit_name,wait_timeout=10)# 如果元素出现，则点击。否则忽略logger.debug('Debug test logging')logger.info('Info test logging')remove_file_if_exists("")# 移除文件如果存在toast('Hello')# Toast通知工具方法列表：printf  打印文本，解决文本如果含有不可见字符无法打印的问题get_files  获取指定路径下特定后缀的文件列表remove_file_if_exists  如果指定文件存在则删除parse_month_zh  将数字转为中文月份，比如把1转为"一月"input_function WinRing发送功能键clear_text  模拟发送退格键，支持WinRing和幽灵键鼠input_text  模拟输入文本，支持WinRing和幽灵键鼠monitor_file_download  监听文件下载remove_files  删除指定路径下的文件，支持通配符read_pdf_text  读取PDF文本pdf_to_images  将PDF转为图片，支持多页check_and_create_folder  检查文件夹是否存在，不存在则创建move_file  移动文件，文件夹不存在则自动创建update_cell_value  更新excel单元格的值，支持 .xls 和 .xlsxupload_sftp_file  上传文件到SFTPset_secure_protocols  更新IE TLS SSL安全值disable_chrome_prompt  禁止Chrome弹出恢复提示框get_local_ip  获取本机IPtoast  在windows 右下角弹出toast 提示框match_image  匹配滑块缺口在大图中的位置信息，要求缺口背景颜色单一
Package: botnoi
Flask==0.11.1
Jinja2==2.8
MarkupSafe==0.23
Werkzeug==0.11.11
requests
numpy
clint
oauth2client
scipy
flask_restful
flask-jsonpify
pymongo
gspread
pandas
stringdist
sklearn
pythainlp
xlrd
gensim
pymongo
scikit-learn
uvicorn==0.11.5
sanic==20.3.0
gunicorn==19.9.0
Package: botnoinlp
Flask==0.11.1
Jinja2==2.8
MarkupSafe==0.23
Werkzeug==0.11.11
requests
numpy
clint
oauth2client
scipy
flask_restful
flask-jsonpify
pymongo
gspread
pandas
stringdist
sklearn
pythainlp
xlrd
gensim
pymongo
scikit-learn
uvicorn==0.11.5
sanic==20.3.0
gunicorn==19.9.0Flask==0.11.1
Jinja2==2.8
MarkupSafe==0.23
Werkzeug==0.11.11
requests
numpy
clint
oauth2client
scipy
flask_restful
flask-jsonpify
pymongo
gspread
pandas
stringdist
sklearn
pythainlp
xlrd
gensim
pymongo
scikit-learn
uvicorn==0.11.5
sanic==20.3.0
gunicorn==19.9.0
Package: boto3auth
boto3authboto3auth is a simple (Python 3) wrapper for starting clients/resources with Boto3.InstallationRequires boto3.pipinstallboto3authUsageimportboto3authb3a=boto3auth.Boto3Auth(region,account_id,role,sts)Properties:region: AWS region (e.g.us-east-1,ca-central-1, etc.)Defaults tous-east-1, if not set.account_id: AWS account number (if assuming role)role: AWS IAM role (if assuming role)sts: Boto3 STS credentials (if assuming a secondary role)Authb3a.auth(resource,type)Arguments:resource: AWS resource (e.g.ec2,dynamodb,sqs, etc.)type: Boto3 Session type (resourceorclient)boto3auth will use local AWS credentials (works well withaws-vault).importboto3auth# EC2 resource in us-east-1, with local credentials.b3a=boto3auth.Boto3Auth()resource=b3a.auth('ec2')# DynamoDB resource in us-west-2, with assumed role.b3a=boto3auth.Boto3Auth('us-west-2','123412341234','my-cool-role')resource=b3a.auth('dynamodb','resource')# EC2 client in ca-central-1 that requires two assumed roles.# e.g. Local -> Account #1 -> Account #2first=boto3auth.Boto3Auth('ca-central-1','123412341234','first-role')first.creds()# creds() runs sts.AssumeRole and sets result to self.sts.second=boto3auth.Boto3Auth('ca-central-1','456745674567','second-role',first.sts)client=second.auth('ec2','client')
Package: boto3-batch-utils
Boto3 Batch UtilsThis library offers some functionality to assist in writing records to AWS services in batches, where your data is not
naturally batched. This helps to achieve significant efficiencies when interacting with those AWS services as batch
writes are often much more efficient than individual writes.DocumentationInstallationThe package can be installed usingpip:pip install boto3-batch-utilsYou may install a specific version of the package:pip install boto3-batch-utils==3.0.0Boto3 and ConfigurationBoto3 Batch Utils is an abstraction around AWS' Boto3 library.boto3is a dependency and will be installed
automatically, if it is not already present.You will need to configure your AWS credentials and roles in exactly the same way as you would if usingboto3directly.For more information onboto3configuration, refer to the AWS documentationhere.ConceptsThe library is very simple to use. To use it, you must initialise a client, send it the payloads you want to transmit
and finally tell the client to clear down.To use the package you do not need care how to batch up the payloads and send them into their target service. The
package will take care of this for you. This allows you to utilise the significant efficiencies ofboto3's batch
send/put/write methods, without the headaches of error handling and batch sizes.Each of the supported services has it's own dispatcher client. Each has the same 2 methods with which to interact. So
interacting with each of the various service clients is similar and follows the same 3 steps:Initialise: Instantiate the batch dispatcher, passing in the required configuration.submit_payload: pass in a payload (e.g. a single message, metric etc).flush_payloads: send all payloads in the backlog.If you are usingboto3-batch-utilsin AWS Lambda, you should call.flush_payloads()at the end of every
invocation.DocumentationFull documentation is available here:boto3-batch-utils DocsContributingFor more information about contributing to this project, please refer to theDeveloper documentation.Acknowledgements[ ~ Dependencies scanned by PyUp.io ~ ]
Package: boto3facade
boto3facade=========================[![Build Status](https://travis-ci.org/FindHotel/boto3facade.svg?branch=master)](https://travis-ci.org/FindHotel/boto3facade)[![PyPI](https://img.shields.io/pypi/v/boto3facade.svg?style=flat)](https://pypi.python.org/pypi/boto3facade)A simple facade for [boto3][boto3] that makes some common tasks easier. The`boto3facade` module is not intended to be used directly but as a sharedcomponents of projects that use boto3.[boto3]: https://github.com/boto/boto3## InstallationTo install the development version:```pip install git+https://github.com/FindHotel/boto3facade```To install the latest stable release:```pip install boto3facade```## QuickstartThe `boto3facade` package contains a collection of modules that implementfacades to different AWS services. For instance the `boto3facade.ec2` moduleimplements the facade to [AWS EC2 service][ec2]. Each of these modulestypically contain just one class, named as the corresponding AWS service. E.g.the `boto3facade.ec2` module contains an `Ec2` class. In some cases, there mayalso be public module functions that implement utilities that don't requireaccess to the [AWS boto3 SDK][boto3]. For instance in the EC2 facade:[ec2]: https://aws.amazon.com/ec2/```pythonimport boto3facade.ec2 as ec2# Get the name of the role associated to the EC2 instanceif ec2.in_ec2():# If this code is running in an EC2 instancerole_name = ec2.get_instance_profile_role()else:role_name = None```Facade methods that actually use `boto3` are always implemented as instancemethods:```pythonfrom boto3facade.ec2 import Ec2# Create the facade objectmy_ec2_facade = Ec2()# Get the list of AMIs that have tags matching the provided onesami_tags = {'Name': 'niceimage', 'Version', 'latest'}ami_list = my_ec2_facade.get_ami_by_tag(ami_tags)# Get the SecurityGroup boto3 resource with a certain namemy_sg = my_ec2_facade.get_sg_by_name('sgname')```## Development```make develop. .env/bin/activate```## ContactIf you have questions, bug reports, suggestions, etc. please create an issue onthe [GitHub project page](http://github.com/FindHotel/boto3facade).## LicenseThis software is licensed under the [MIT license](http://en.wikipedia.org/wiki/MIT_License)See [License file](https://github.com/FindHotel/boto3facade/blob/master/LICENSE)© 2016 German Gomez-Herrero, and FindHotel.
Package: boto3-helpers
boto3_helpersis a Python library that aims to provide a smoother interface for
some of the functions in the AWSboto3package.You know how to install it:pipinstallboto3-helpersHave you ever seen anybody make this mistake?fromboto3importresourceasboto3_resourcefromboto3.dynamodb.conditionsimportKey# Don't do this; you'll miss out if there is more than one pageddb_table=boto3.resource('dynamodb').Table('example-table')resp=ddb_table.query(KeyConditionExpression=Key('username').eq('johndoe'))foriteminresp.get('Items',[]):print(item)What they should have done is this:fromboto3importresourceasboto3_resourcefromboto3.dynamodb.conditionsimportKey# Loop through all the pagesddb_table=boto3.resource('dynamodb').Table('example-table')kwargs={'KeyConditionExpression':Key('username').eq('johndoe')}whileTrue:resp=ddb_table.query(**kwargs)foriteminresp.get('Items',[]):print(item)if'LastEvaluatedKey'notinresp:breakkwargs['ExclusiveStartKey']=resp['LastEvaluatedKey']Withboto3_helpers, you can do the right thing more easily:fromboto3importresourceasboto3_resourcefromboto3.dynamodb.conditionsimportKeyfromboto3_helpers.dynamodbimportquery_tableddb_table=boto3.resource('dynamodb').Table('example-table')foriteminquery_table(ddb_table,KeyConditionExpression=Key('username').eq('johndoe')):print(item)This package provides helper functions for several similar actions in AWS, such as:Paging through S3 listingsUpdating items in DynamoDBAssuming roles with STSSending and deleting messages with SQSPulling metric data from CloudWatchSee thelatest docsfor more.
Package: boto3-large-message-utils
boto3_large_message_utilsThis library provides a way of bypassing AWS size restrictions when using services such as SQS and SNS, by providing methods to cache message bodies in S3 and parse them again at the other end.UsageInstallInstall the package using pippipinstallboto3_large_message_utilsInitialise HandlerImport and set up theLargeMessageBuilderfromboto3_large_message_utilsimportLargeMessageBuilderbuilder=LargeMessageBuilder(s3_bucket_for_cache='my-bucket',#REQUIREDs3_object_prefix='my-prefix',compress=True,#message_size_threshold=100000, # Pass an optional message size threshold#session=session, # Pass an optional boto3 session to initialise the client from the session)Handle a message# create your message in the normal way, build expects a stringmsg=json.dumps({'content':'this is my message'})# submit your message to the handlernew_msg=builder.build(msg)# send message to SQS, SNS or another AWS serviceMessage with Message Attributes# create your message in the normal way, build expects a stringmsg=json.dumps({'content':'this is my message'})msg_attr={"MSG_ATTR":{"StringValue":"my-value"}}# submit your message to the handlermsg=builder.build(msg,msg_attr)# send message to SQS, SNS or another AWS serviceParse a messageHandle a message that has been optimised by the Base.# received message from SQS or another AWS service.parser=LargeMessageParser(#session=session, # Pass an optional boto3 session to initialise the client from the session)msg=parser.parse(received_message)
Package: boto3-meiqia
Boto3 is the Amazon Web Services (AWS) Software Development Kit (SDK) for
Python, which allows Python developers to write software that makes use
of services like Amazon S3 and Amazon EC2. You can find the latest, most
up to date, documentation atRead the Docs, including a list of
services that are supported. To see only those features which have been
released, check out thestable docs.Quick StartFirst, install the library and set a default region:$pipinstallboto3Next, set up credentials (in e.g.~/.aws/credentials):[default]aws_access_key_id=YOUR_KEYaws_secret_access_key=YOUR_SECRETThen, set up a default region (in e.g.~/.aws/config):[default]region=us-east-1Then, from a Python interpreter:>>>importboto3>>>s3=boto3.resource('s3')>>>forbucketins3.buckets.all():print(bucket.name)DevelopmentGetting StartedAssuming that you have Python andvirtualenvinstalled, set up your
environment and install the required dependencies like this instead of
thepip install boto3defined above:$gitclonehttps://github.com/boto/boto3.git$cdboto3$virtualenvvenv...$.venv/bin/activate$pipinstall-rrequirements.txt$pipinstall-e.Running TestsYou can run tests in all supported Python versions usingtox. By default,
it will run all of the unit tests, but you can also specify your ownnosetestsoptions. Note that this requires that you have all supported
versions of Python installed, otherwise you must pass-eor run thenosetestscommand directly:$tox$toxtests/unit/test_session.py$tox-epy26,py33tests/integrationYou can also run individual tests with your default Python version:$noseteststests/unitGenerating DocumentationSphinx is used for documentation. You can generate HTML locally with the
following:$pipinstall-rrequirements-docs.txt$cddocs$makehtmlGetting HelpWe use GitHub issues for tracking bugs and feature requests and have limited
bandwidth to address them. Please use these community resources for getting
help:Ask a question onStack Overflowand tag it withboto3Come join the AWS Python community chat ongitterOpen a support ticket withAWS SupportIf it turns out that you may have found a bug, pleaseopen an issue
Package: boto3-missing
boto3-missingThe AWS Python SDK,boto3, hasresourceobjects that provide
high-level interfaces to AWS services. TheDynamoDB resourcegreatly simplifies marshalling and unmarshalling data. We rely on
the resource method forTransactWriteItemsamong others that are
absent from boto3. We opened PRhttps://github.com/boto/boto3/pull/4010to add that method.The resource methods are synthesized at runtime from a data file.
Fortunately, boto3 has aLoadermechanism that allows the user to
add extra data files, and theloader search pathis configurable.In order to not depend upon our upstream PR for boto3, we distribute
the extra data files and fix up the loader search path by putting it
in a.pth filewhich Python executes automatically during startup.Added methodsThe following methods are added to theDynamoDB service resource:get_itemput_itemqueryscantransact_write_items
Package: boto3-oversize
boto3-oversizeMessages published using Amazon SNS have amaximum size of 256KiB,
which can be a limitation for certain use cases. AWS provides anextended client library for Javathat transparently uploads messages exceeding this threshold to S3 and restores them when the
messages are received. This Python package provides the same functionality forboto3.InstallationCreate an Amazon S3 bucket that will store message payloads that exceed the maximum size.While the Java library deletes payloads from S3 when they are retrieved, this is not
appropriate when there are multiple subscribers to the topic. Instead, apply aS3 lifecycle configurationto expire the message payloads after a reasonable length of time, e.g., 14 days.Install this package, e.g.,pip install boto3-oversize.Define theOVERSIZE_PAYLOAD_BUCKET_NAMEenvironment variable as the name of the bucket you created;
ensure your AWS access credentials have permission to callPutObjectandGetObjectin the
root of the bucket.UsageThe library provides replacement implementations of the core boto3 entry points that transparently
apply the necessary changes to the SNS and SQS clients, both for the low-level client and service
resource. Simply referenceboto3_oversizeinstead ofboto3.Low-level client exampleimportboto3_oversizesns_client=boto3_oversize.client('sns')response=sns_client.create_topic(Name='example-large-payload-topic')sns_client.publish(TopicArn=response['TopicArn'],Message='example-message')Service resource exampleimportboto3_oversizesqs_client=boto3_oversize.resource('sqs')queue=sqs_client.create_queue(QueueName='example-large-payload-queue')messages=queue.receive_messages()ImplementationCalls to publish messages are intercepted and the message body sized check against the limit,
reduced by a small percentage to consider SNS message envelope overhead if raw message delivery is
not enabled. If the message exceeds this threshold, it is uploaded to an S3 bucket and the SNS
message replaced with the object ARN.When receiving messages, the SQS client checks if the entire message body appears to be an S3 object
ARN. If it is, the object is retrieved from S3 and returned to the caller as the message body.
Package: boto3_paste
Utility forboto3.session.Session()Installfrom PyPI:pip install boto3_pastefrom source:$ pip install .How to useIf you usepyramid:import boto3_paste

def main(global_config, **settings):
    boto_session = boto3_paste.session_from_config(settings)
    config = Configurator(settings=settings)

    # Some your configuration

    return config.make_wsgi_app()Configuration KeysSeeboto3.session.Sessionandbotocore.session.Session’s Documents.Example ini-file:boto3.aws_access_key_id =
boto3.aws_secret_access_key =
boto3.aws_session_token =
boto3.region_name =
boto3.profile_name =
boto3.botocore.profile =
boto3.botocore.region =
boto3.botocore.data_path =
boto3.botocore.config_file = ~/.aws/config
boto3.botocore.ca_bunfle =
boto3.botocore.credentials_file = ~/.aws/credentials
boto3.botocore.metadata_service_timeout = 1
boto3.botocore.metadata_service_num_attempts = 1All keys are not mandatory.
If you don’t write any keys,boto3.session.Sessioninstances are
created bydefault.Change History0.1 - 2016-04-05Initial release.