Saravanan666/pypi-org huggingface dataset:
Package: aws-recommendation-a5
aws_recommendationsaws_recommendations package gives recommendation for you aws accountRelease Notes:v0.0.10Added methods for following recommendations:Low Utilization Amazon EC2 InstancesUnderutilized Amazon Redshift Clustersidle ebs volumesIdle elbenable s3 bucket keysrds_general_purpose_ssdebs_general_purpose_ssdunused_amiv0.0.7Added methods for new recommendationsAdded following methods:reserved_instance_lease_expiration()unassociated_elastic_ip_addresses()rds_idle_db_instances()v0.0.3Minor bug fixesv0.0.2Improved code qualityMulti region now supportedv0.0.1 - Initial Release
Package: aws-recommendation-a6
aws_recommendationsaws_recommendations package gives recommendation for you aws accountRelease Notes:v0.0.10Added methods for following recommendations:Low Utilization Amazon EC2 InstancesUnderutilized Amazon Redshift Clustersidle ebs volumesIdle elbenable s3 bucket keysrds_general_purpose_ssdebs_general_purpose_ssdunused_amiv0.0.7Added methods for new recommendationsAdded following methods:reserved_instance_lease_expiration()unassociated_elastic_ip_addresses()rds_idle_db_instances()v0.0.3Minor bug fixesv0.0.2Improved code qualityMulti region now supportedv0.0.1 - Initial Release
Package: aws-recommendation-a7
aws_recommendationsaws_recommendations package gives recommendation for you aws accountRelease Notes:v0.0.10Added methods for following recommendations:Low Utilization Amazon EC2 InstancesUnderutilized Amazon Redshift Clustersidle ebs volumesIdle elbenable s3 bucket keysrds_general_purpose_ssdebs_general_purpose_ssdunused_amiv0.0.7Added methods for new recommendationsAdded following methods:reserved_instance_lease_expiration()unassociated_elastic_ip_addresses()rds_idle_db_instances()v0.0.3Minor bug fixesv0.0.2Improved code qualityMulti region now supportedv0.0.1 - Initial Release
Package: aws-recommendation-a8
aws_recommendationsaws_recommendations package gives recommendation for you aws accountRelease Notes:v0.0.10Added methods for following recommendations:Low Utilization Amazon EC2 InstancesUnderutilized Amazon Redshift Clustersidle ebs volumesIdle elbenable s3 bucket keysrds_general_purpose_ssdebs_general_purpose_ssdunused_amiv0.0.7Added methods for new recommendationsAdded following methods:reserved_instance_lease_expiration()unassociated_elastic_ip_addresses()rds_idle_db_instances()v0.0.3Minor bug fixesv0.0.2Improved code qualityMulti region now supportedv0.0.1 - Initial Release
Package: aws-recommendation-a9
aws_recommendationsaws_recommendations package gives recommendation for you aws accountRelease Notes:v0.0.10Added methods for following recommendations:Low Utilization Amazon EC2 InstancesUnderutilized Amazon Redshift Clustersidle ebs volumesIdle elbenable s3 bucket keysrds_general_purpose_ssdebs_general_purpose_ssdunused_amiv0.0.7Added methods for new recommendationsAdded following methods:reserved_instance_lease_expiration()unassociated_elastic_ip_addresses()rds_idle_db_instances()v0.0.3Minor bug fixesv0.0.2Improved code qualityMulti region now supportedv0.0.1 - Initial Release
Package: aws-recommendations
aws_recommendationsaws_recommendations package gives recommendation for you aws accountRelease Notes:v0.0.10Added methods for following recommendations:Low Utilization Amazon EC2 InstancesUnderutilized Amazon Redshift Clustersidle ebs volumesIdle elbenable s3 bucket keysrds_general_purpose_ssdebs_general_purpose_ssdunused_amiv0.0.7Added methods for new recommendationsAdded following methods:reserved_instance_lease_expiration()unassociated_elastic_ip_addresses()rds_idle_db_instances()v0.0.3Minor bug fixesv0.0.2Improved code qualityMulti region now supportedv0.0.1 - Initial Release
Package: aws-region-proximity
AWS Region ProximityPrint a JSON dictionary where the key is an AWS region code name (us-west-2,
eu-central-1, etc.), and the value is a list of regions in order of their
physical proximity to the region. You may optionally pass in a list of region
code names that you have a copy of the resource in. The results will have the
same keys, but the lists will only contain the regions you specified.Why?Say you have S3 buckets being cross-region-replicated inus-west-2,eu-central-1, andap-southeast-1and you want to put a Cloudfront
distribution in front of them. You can use a Lambda@Edge with an Origin Request
trigger to change the origin that Cloudfront will pull a resource from.
Lambda@Edge has the environment variableAWS_REGION, which will tell you the
closest region to where your Lambda is executing. You could then use the list
generated by this program to help find the nearest origin that can handle the
request.For example, a request comes in to theDFWedge location. The environment
variableAWS_REGIONis"us-east-1"(the AWS region associated with the edge
location ofDFW). You don't have a copy of the resource inus-east-1, but
you do have a copy inus-west-2. So that can be the copy you return (as
opposed to your copy ineu-central-1orap-southeast-1).Installpipinstallaws-region-proximityUsageGet the Closest Regions for All Regionsaws-regionsOutput:{"us-east-1":["us-east-1","us-east-2","ca-central-1","us-west-2","us-west-1","eu-west-1","eu-west-2","eu-west-3","eu-central-1","eu-north-1","eu-south-1","sa-east-1","ap-northeast-1","me-south-1","cn-north-1","ap-northeast-2","cn-northwest-1","af-south-1","ap-south-1","ap-east-1","ap-southeast-1","ap-southeast-2"],..."cn-northwest-1":["cn-northwest-1","cn-north-1","ap-east-1","ap-northeast-2","ap-northeast-1","ap-south-1","ap-southeast-1","me-south-1","eu-north-1","eu-central-1","eu-south-1","eu-west-2","eu-west-3","eu-west-1","ap-southeast-2","us-west-2","us-west-1","ca-central-1","us-east-2","us-east-1","af-south-1","sa-east-1"]}Get Closest Specified Regions per RegionFor when you have copies in a limited number of regions and just want to see
your closest available region given some other region.aws-regionsus-west-2eu-central-1ap-southeast-1Output{"us-east-1":["us-west-2","eu-central-1","ap-southeast-1"],"us-east-2":["us-west-2","eu-central-1","ap-southeast-1"],"us-west-1":["us-west-2","eu-central-1","ap-southeast-1"],"us-west-2":["us-west-2","eu-central-1","ap-southeast-1"],"eu-west-1":["eu-central-1","us-west-2","ap-southeast-1"],..."cn-north-1":["ap-southeast-1","eu-central-1","us-west-2"],"cn-northwest-1":["ap-southeast-1","eu-central-1","us-west-2"]}There is still a key for every region, but the list of the closest regions is
limited to those specified on the command line.From Whence Comes This Data?This Gist:https://gist.github.com/atyachin/a011edf76df66c5aa1eac0cdca412ea9Instead of geographic coordinates, it'd probably be better if we sorted by
actual inter-region latency, like what this table has:https://www.cloudping.co/gridPut it on the TODO list.
Package: aws-regions
OverviewThis package provides a very simple API for retrieving the most up-to-date
region list. The region info is pulled from the botocore Github project so
this requires a network connection. The advantage to using botocore directly
is that the region list is not reliant on the botocore version which is
installed. This can be an issue if you are using system packages for example,
which may get updates very infrequently and thus may be missing new regions.RequirementsrequestsInstallationpipinstallaws-regionsUsageThere are two main functions in aws-regions. The first function will provide
a list of regions based on the AWS partition. By default this is this public
AWS partition:fromaws_regions.endpointsimportget_regions# Defaults to "aws" partitionregions=get_regions()# "aws-cn" partitioncn_region=get_regions(partition='aws-cn')The second function will return a list of all regions from all three
partitions:fromaws_regions.endpointsimportget_all_regionsall_regions=get_all_regions()# From aws, aws-cn and aws-us-govIssues/EnhancementsPlease submit issues and requests toGithub.ContributingContributions toaws-regionsare welcome and encouraged. SeeCONTRIBUTINGfor info on getting started.LicenseCopyright (c) 2021 SUSE LLC.Distributed under the terms of MIT license, seeLICENSEfor details.
Package: awsreport
AWS ReportAWS Report is a tool for analyzing amazon resources.Install using PIPpip install awsreportFeaturesSearch IAM users based on creation dateSearch buckets publicSearch security based in rules, default is 0.0.0.0/0Search elastic ip dissociatedSearch volumes availableSearch AMIs with permission publicSearch internet gateways detachedOptionsaws_report.py [OPTIONS]

Options:
  --s3          Search buckets public in s3
  --iam         Search iam users based on creation date
  --iam-max-age Use max-age to search for users created more than X days ago
  --sg          Search security groups with inbound specific rule
  --elasticip   Search elastic IP not associated
  --volumes     Search volumes available
  --ami         Search AMIs with permission public
  --owner       Defines the owner of the resources to be found
  --igw         Search internet gateways detached
  --help        Show this message and exit.

Examples:
    python awsreport.py --s3
    python awsreport.py --iam --owner 296192063842
    python awsreport.py --iam --iam-max-age 60
    python awsreport.py --sg --cidr 192.168.1.0/24 or
    python awsreport.py --sg (cidr default is 0.0.0.0)Developer contact[+] Twitter: @bsd0x1
[+] Telegram: @bsd0x
[+] Github: /bsd0x
Package: awsrequests
aws-requests================making AWS4-HMAC-SHA256 signed HTTP calls with requestspython::from awsrequests import AwsRequesterreq = AwsRequester("us-west-2")req.get("http://myapigateway.whatever.com/")req.post("http://myapigateway.whatever.com/",json=dict(my="data")Credentials------AwsRequester can either have a key and secret passed in, or it will try to find creds in the same way boto3 would.
Package: aws-request-signer
aws-request-signerA python library to sign AWS requests using AWS Signature V4.This small python library serves only purpose: Helping you sign HTTP
requests for use with AWS (and compatible) services. The library is
unopinionated and should work with just about anything that makes HTTP
requests (requests, aiohttp).It supports generating authorization headers for HTTP requests,
pre-signing URLs so you can easily use them elsewhere and signing S3
POST policies for use in HTML forms.This library has no requirements, but comes with an authentication
helper for the requests package.Installationaws-request-signeris available from pypi:pipinstallaws-request-signerUsage exampleHere's an example of how to use the library to sign a request to upload a file to aminioS3 bucket running on your local machine:importhashlibimportrequestsfromaws_request_signerimportAwsRequestSignerAWS_REGION=""AWS_ACCESS_KEY_ID="minio"AWS_SECRET_ACCESS_KEY="minio123"URL="http://127.0.0.1:9000/demo/hello_world.txt"# Demo content for our target file.content=b"Hello, World!\n"content_hash=hashlib.sha256(content).hexdigest()# Create a request signer instance.request_signer=AwsRequestSigner(AWS_REGION,AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,"s3")# The headers we'll provide and want to sign.headers={"Content-Type":"text/plain","Content-Length":str(len(content))}# Add the authentication headers.headers.update(request_signer.sign_with_headers("PUT",URL,headers,content_hash))# Make the request.r=requests.put(URL,headers=headers,data=content)r.raise_for_status()For more examples and usage, please refer todemo.py.Development setupFor development purposes, you can clone the repository and usepoetryto install and maintain the
dependencies. There is no test suite. It comes with a set of pre-commit
hooks that can format (isort, black) and check your code (mypy, flake8)
automatically.gitclonegit@github.com:iksteen/aws-request-signer.gitcdaws-request-signer
poetryinstall-Edemo
poetryrunpre-commitinstallRelease History1.2.0Add support for passing a security token toAwsRequestSignerandAwsAuthhelper for request. Thanks @ajpl.1.1.1Usequoteinstead of the defaultquote_plusso query
arguments that contain spaces work (thanks @eraser-77).1.1.0Minimum supported python version is now 3.6.1.Assume empty content when signing a HEAD or DELETE request
just as we do when signing a GET request. Thanks @alvassin!Fix bug wheresign_with_headersdid not include valueless
query arguments in the signing process (f.e.?acl).1.0.0Initial Release.MetaIngmar Steen –@iksteenDistributed under the MIT license. SeeLICENSEfor more information.https://github.com/iksteen/ContributingFork it (https://github.com/iksteen/aws-request-signer/fork)Create your feature branch (git checkout -b feature/fooBar)Commit your changes (git commit -am 'Add some fooBar')Push to the branch (git push origin feature/fooBar)Create a new Pull Request
Package: aws-resource-monitor
AWS Resource MonitorSmall Python 3.5+ convenience library to easily monitor CPU and memory usage in AWS Batch jobs and report them to StatsD. Since it usesECS Task Metadata V3 endpointsit is perfectly suitable to do so for other type of ECS tasks as well.SetupYou can install this package by usingpip:pip install aws-resource-monitorIf you fancypipenvuse:pipenv install aws-resource-monitorTo install from source, run:python setup.py installTo install via requirements file, add the following:-e git+https://github.com/luigisbox/aws-resource-monitor.git#egg=aws-resource-monitorUsageFirst off, you need to require the library:from aws_resource_monitor import resource_monitoringTheresource_monitoringis a context manager accepting two positional arguments:statsd_clientis your own instance of StatsD client (seePythonStatsD librarywhich will be used to report metrics.metrics_prefixis a string which will prefix individual metrics.Optionally, you can pass in keyword argumentintervalwithtimedeltaobject customizing polling period for new metrics (default is every five seconds).with resource_monitoring(statsd_client, metrics_prefix):
	fn()Behind the scenes,resource_monitoringcontext manager first checks for existence ofECS_CONTAINER_METADATA_URIenvironment variable. If it is not found, the monitor does nothing thus working well in development.In production or when the variable exists, it creates a separate thread from your main application that reads task UUID and polls the "stats" endpoint in the metadata URI to complete and send as gauge the following metrics:cpu.systemcpu.usercpu.percentmemory.limitmemory.usagememory.max_usageA more complete example would be:import statsd
from aws_resource_monitor import resource_monitoring

statsd = statsd.StatsClient('localhost', 8125)

with resource_monitoring(statsd, "example.metrics.", interval=timedelta(seconds=10)):
	fn()For example, for the task UUID assigned by AWS "afc92259-3a0c-4e14-8e23-a49cc41e7947" this will report gauge "example.metrics.afc92259-3a0c-4e14-8e23-a49cc41e7947.memory.usage" and in ten seconds check and report again.ContributingCheck for open issues or open a new issue for a feature request or a bug.Fork the repository and make your changes to the master branch (or branch off of it).Send a pull request.DevelopmentRun the linter with:make lintThe client library uses Black for code formatting. Code must be formatted with Black before PRs are submitted. Run the formatter with:make fmtChangelogv1.0.0: 08/06/2020Initial version.
Package: aws-resource-search
Welcome toaws_resource_searchDocumentation📙Full Documentation HEREAWS Resource Search (ARS)is a terminal application that enables interactive searches for AWS resources. It is a mini AWS console in your terminal or shell environment.It utilizes advanced indexing techniques that supportfull-textsearch(any word, no longer restricted to prefix or suffix matching),fuzzy search(tolerating spelling mistakes), andn-gramsearch (allowing matching of series of n adjacent characters).ARS comes with built-in query caching, ensuringblazing-fastperformanceeven when dealing with a large number of AWS resources such as IAM roles, Lambda Functions, CloudFormation stacks, and more.As a Python library, installation is as simple as runningpip install aws_resource_search. There’s no need to set up databases, additional search tools, or install any other software.The data stays on your laptop, there’s no remote server involved.Theopen-source Community Editionof ARS allows searching within a single AWS Account and one AWS region at a time. You can switch between different AWS accounts before conducting your searches. On the other hand, theEnterprise Editionof ARS offers the capability to search across multiple AWS accounts and AWS regions, providing an aggregated view. Currently, the enterprise version is in beta and is expected to become generally available in early 2024.”DemoSearch S3 Bucket.Search StepFunction execution, which is a child resource of StepFunction state machine.Installaws_resource_searchis released on PyPI, so all you need is:$pipinstallaws_resource_searchTo upgrade to latest version:$pipinstall--upgradeaws_resource_search
Package: awsretry
AWSRetry is a Python Decorator that can be used to wrap boto3 function calls.
This function was built out of the need to get around a couple of common issues
when working with AWS API’s.Query API Request RateEventual Consistency Model.Exceptions that will get retried when encounteredRequestLimitExceededUnavailableServiceUnavailableInternalFailureInternalError^w+.NotFoundThis list can be extended. (http://docs.aws.amazon.com/AWSEC2/latest/APIReference/errors-overview.html)Quick StartInstall awsretry.$pipinstallawsretryI will assume you know about setting up Boto3 Credentials, if not you can read
the instructions herehttp://boto3.readthedocs.io/en/latest/guide/configuration.htmlKeyword Arguments that AWSRetry.backoff acceptstries = The number of times to try before giving up. Default = 10delay = The initial delay between retries in seconds. Default = 3backoff = backoff multiplier e.g. value of 2 will double the delay each retry. Default = 1.1added_exceptions = Other exceptions to retry on, beyond the defaults. Default = list()ExamplesWrite a quick function that implements AWSRetry.backoff()#!/usr/bin/env pythonimportbotocoreimportboto3fromawsretryimportAWSRetry@AWSRetry.backoff()defget_instances():client=boto3.client('ec2')try:instances=client.describe_instances()returninstancesexceptbotocore.exceptions.ClientErrorase:raisee:instances=get_instances()Write a quick function that will overwrite the default arguments.#!/usr/bin/env pythonimportbotocoreimportboto3fromawsretryimportAWSRetry@AWSRetry.backoff(tries=20,delay=2,backoff=1.5,added_exceptions=['ConcurrentTagAccess'])defcreate_tags():client=boto3.client('ec2')try:resources=['1-12345678891234']tags=[{'Key':'service'},{'Value':'web-app'}]instances=client.create_tags(Resources=resources)exceptbotocore.exceptions.ClientErrorase:raisee:create_tags()DevelopmentAssuming that you have Python andvirtualenvinstalled, set up your
environment and install the required dependencies like this instead of
thepip install awsretrydefined above:$gitclonehttps://github.com/linuxdynasty/awsretry.git$cdawsretry$virtualenvvenv...$.venv/bin/activate$pipinstall-rrequirements.txt$pipinstall-e.Running TestsYou can run the tests by using tox which implements nosetest or run them
directly using nosetest.$tox$toxtests/test_awsretry.py$tox-epy27,py36tests/$nosetest
Package: aws-rfdk
Render Farm Deployment Kit on AWSThe Render Farm Deployment Kit on AWS (RFDK) is an open-source software development kit (SDK) that can be used to deploy, configure, and manage your render farm
infrastructure in the cloud. The RFDK is built to operate with the AWS Cloud Development Kit (CDK) and provides a library of classes, called constructs, that each
deploy and configure a component of your cloud-based render farm. The current version of the RFDK supports render farms built using AWS Thinkbox Deadline
render management software, and provides the ability for you to easily go from nothing to a production-ready render farm in the cloud.You can model, deploy, configure, and update your AWS render farm infrastructure by writing an application, in Python or Node.js, for the CDK toolkit using the
libraries provided by the CDK and RFDK together and with other CDK-compatible libraries. Your application is written in an object-oriented style where creation of
an object from the CDK and RFDK libraries represents the creation of a resource, or collection of resources, in your AWS account when the application is deployed
via AWS CloudFormation by the CDK toolkit. The parameters of an object’s creation control the configuration of the resource.Please see the following sources for additional information:TheRFDK Developer GuideTheRFDK API DocumentationTheREADME for the main moduleTheREADME for the Deadline moduleTheRFDK Upgrade Documentation
Package: aws-role-credentials
Generates AWS credentials for roles using STS and writes them to`~/.aws/credentials`UsageSimply pipe a SAML assertion into awssaml# create credentials from saml assertion$oktaauth-ujobloggs|aws_role_credentialssaml--profiledevOr for assuming a known role name:# create credentials from saml assertion using a known role ARN$oktaauth-ujobloggs|aws_role_credentialssaml--profiledev--role-arnarn:aws:iam::098765432109:role/ReadOnlyOr for assuming a role using an IAM user:# create credentials from an iam user$aws_role_credentialsuser\arn:aws:iam::111111:role/devjobloggs-session\--profiledevFor roles that require MFA:# create credentials from an iam user with mfa$aws_role_credentialsuser\arn:aws:iam::111111:role/devjobloggs-session\--profiledev\--mfa-serial-numberarn:aws:iam::111111:mfa/Jo\--mfa-token102345Transient mode`aws_role_credentials`also supports ‘transient’ mode where the
credentials are passed to a command as environment variables within
the process.  This adds an extra layer of safety and convinience.To use transient mode simply pass a command to the`--exec`option
like so:# run 'aws s3 ls' with the generated role credentials from an iam user$aws_role_credentialsuser\arn:aws:iam::111111:role/devjobloggs-session\--exec'aws s3 ls'Options--profileUse a specific profile in your credential file (e.g. Development).  Defaults to sts.--regionThe region to use. Overrides config/env settings.  Defaults to us-east-1.--role-arnOptionalrole ARNto use when multiple roles are available.--execThe command to execute with the AWS credentialsThanksThanks to Quint Van Deman of AWS for demonstrating how to do this.https://blogs.aws.amazon.com/security/post/Tx1LDN0UBGJJ26Q/How-to-Implement-Federated-API-and-CLI-Access-Using-SAML-2-0-and-AD-FSAuthorsPeter Gillard-MossHistory0.1.0 (2015-01-11)First release on PyPI.