Saravanan666/pypi-org huggingface dataset:
Package: cloudflare-tor-whitelister
CloudFlare provides an external service to defend your site against denial of service attacks. Unfortunately Tor users are often inconvenienced by repeated requests to solve CAPTCHA’s due to CloudFlare’s threat scoring approach.CloudFlare does not currently provide a means of allowing Tor visitors. Website operators should be able to take advantage of the increased stability and DoS resistance that CloudFlare provides without blocking their anonymous users.On the[tor-talk]mailing list, Moritz Bartl proposed the idea that operators could explicitly white list Tor exit IP addresses in their control panel as a stop-gap measure to avoid blocking their users.This script is a rough proof-of-concept which whitelist’s Tor exit IP addresses via the CloudFlare REST API. Problematically CloudFlare currently enforces a maximum limit of 200 access rules per user or zone. However the top 200 Tor exit IP addresses currently represent ~95% of the exit probability. as such using this should still significantly enhance the user experience for Tor users.All feedback and bug reports very welcome!Installation$ pip install cloudflare-tor-whitelisterUsageYour CloudFlare API token and email can also be specified in the environment variables CLOUDFLARE_API_TOKEN and CLOUDFLARE_EMAIL.$ cloudflare-whitelist -t 'API_TOKEN' -e 'CLOUDFLARE_EMAIL'By default the whitelist rules are applied across all zones owned by your account. If instead you would like to only whitelist on a particular domain you should specify it with the –zone option.It is probably sufficient to run this script viacrononce per day.
Package: cloudformation-cli-go-plugin
AWS CloudFormation Resource Provider Go PluginThe CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.This plugin library helps to provide Go runtime bindings for the execution of your providers by CloudFormation.UsageIf you are using this package to build resource providers for CloudFormation, install theCloudFormation CLI Go Plugin- this will automatically install the theCloudFormation CLI! A Python virtual environment is recommended.pip3installcloudformation-cli-go-pluginRefer to the documentation for theCloudFormation CLIfor usage instructions.DevelopmentFor changes to the plugin, a Python virtual environment is recommended. Check out and install the plugin in editable mode:python3-mvenvenvsourceenv/bin/activate
pip3install-e/path/to/cloudformation-cli-go-pluginYou may also want to check out theCloudFormation CLIif you wish to make edits to that. In this case, installing them in one operation works well:pip3install\-e/path/to/cloudformation-cli\-e/path/to/cloudformation-cli-go-pluginThat ensures neither is accidentally installed from PyPI.Linting and running unit tests is done viapre-commit, and so is performed automatically on commit. The continuous integration also runs these checks. Manual options are available so you don't have to commit:# run all hooks on all files, mirrors what the CI runspre-commitrun--all-files# run unit tests only. can also be used for other hooks, e.g. black, isort, pytest-localpre-commitrunpytest-localUse./generate-examples.shto run installcloudformation-cli-go-pluginlocally and runcfn generatein each example.Getting startedThis plugin create a sample Go project and requires golang 1.8 or above andgodep. For more information on installing and setting up your Go environment, please visit the officialGolang site.CommunityJoin us on Discord! Connect & interact with CloudFormation developers &
experts, find channels to discuss and get help for cfn-lint, CloudFormation registry, StackSets,
Guard and more:LicenseThis library is licensed under the Apache 2.0 License.
Package: cloudformation-cli-java-plugin
AWS CloudFormation Resource Provider Java PluginThe CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.This plugin library helps to provide Java runtime bindings for the execution of your providers by CloudFormation.UsageIf you are using this package to build resource providers for CloudFormation, install theCloudFormation CLI Java Plugin- this will automatically install the theCloudFormation CLI! A Python virtual environment is recommended.PrerequisitesPython version 3.8 or aboveYour choice of Java IDELombok: The code generated by the CloudFormation CLI usesLombok, which requires support in IDEs for some syntax highlighting to work. For the best development experience, it is recommended you install Lombok support in your IDE.Installationpip3installcloudformation-cli-java-pluginRefer to theCloudFormation CLI User Guidefor theCloudFormation CLIfor usage instructions.Alternate Type FormatsTheformatkeyword can be specified on primitive types defined in a resource provider's schema to allow the CloudFormation CLI Java Plugin to generate more than the defaults for primitive types. Consult the table below for what formats are available and defaults for various types. Thedefaultvalue is used if omitted:JSON Schema TypeFormat valueGenerated variable typebooleandefaultBooleanintegerdefault,int32Integerintegerint64LongnumberdefaultDoublestringdefaultStringFor example, the below schema for a property would generate a variable of typeLong.{
    "type": "integer",
    "format": "int64"
}DevelopmentFor changes to the plugin, a Python virtual environment is recommended. Check out and install the plugin in editable mode:python3-mvenvenvsourceenv/bin/activate
pip3install-e/path/to/cloudformation-cli-java-pluginInstallpytest-cov, used when running unit tests for this plugin:pip3installpytest-covYou may also want to check out theCloudFormation CLIif you wish to make edits to that. In this case, installing them in one operation works well:pip3install\-e/path/to/cloudformation-cli\-e/path/to/cloudformation-cli-java-pluginThat ensures neither is accidentally installed from PyPI.Linting and running unit tests is done viapre-commit, and so is performed automatically on commit after being installed (pre-commit install). The continuous integration also runs these checks. Manual options are available so you don't have to commit:# run all hooks on all files, mirrors what the CI runspre-commitrun--all-files# run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-localpre-commitrunpytest-localLicenseThis library is licensed under the Apache 2.0 License.
Package: cloudformation-cli-python-plugin
AWS CloudFormation Resource Provider Python PluginThe CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.This plugin library helps to provide Python runtime bindings for the execution of your providers by CloudFormation.AWS CloudFormation Resource Provider Python PluginThe CloudFormation Resource Provider Development Kit (RPDK) allows you to author your own resource providers that can be used by CloudFormation.This plugin library helps to provide runtime bindings for the execution of your providers by CloudFormation.CommunityJoin us on Discord! Connect & interact with CloudFormation developers &
experts, find channels to discuss and get help for our CLIs, cfn-lint, CloudFormation registry, StackSets,
Guard and more:Installationpipinstallcloudformation-cli-python-pluginHowto$ cfn init
Initializing new project
What's the name of your resource type?
(Organization::Service::Resource)
>> Foo::Bar::Baz
Select a language for code generation:
[1] java
[2] csharp
[3] python36
[4] python37
(enter an integer):
>> 4
Use docker for platform-independent packaging (Y/n)?
This is highly recommended unless you are experienced
with cross-platform Python packaging.
>> y
Initialized a new project in <>
$ cfn submit --dry-run
$ cat <<EOT > test.json
{
  "credentials": {
    "accessKeyId": "",
    "secretAccessKey": "",
    "sessionToken": ""
  },
  "action": "CREATE",
  "request": {
    "clientRequestToken": "ecba020e-b2e6-4742-a7d0-8a06ae7c4b2b",
    "desiredResourceState": {
      "Title": "This_Is_The_Title_For_My_Example",
      "TestCode": "NOT_STARTED"
    },
    "previousResourceState": null,
    "logicalResourceIdentifier": null
  },
  "callbackContext": null
}
EOT
$ sam local invoke TestEntrypoint --event test.jsonDevelopmentFor changes to the plugin, a Python virtual environment is recommended. The development requirements can be sourced from the core repository:python3 -m venv env
source env/bin/activate
pip install -e . -e src/ \
  -r https://raw.githubusercontent.com/aws-cloudformation/aws-cloudformation-rpdk/master/requirements.txt
pre-commit installLinting and running unit tests is done viapre-commit, and so is performed automatically on commit. The continuous integration also runs these checks. Manual options are available so you don't have to commit):# run all hooks on all files, mirrors what the CI runs
pre-commit run --all-files
# run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-local
pre-commit run pytest-localLicenseThis library is licensed under the Apache 2.0 License.
Package: cloudformation-cli-typescript-plugin
AWS CloudFormation Resource Provider Typescript PluginWe're excited to share our progress with adding new languages to the CloudFormation CLI!AWS CloudFormation Resource Provider TypeScript PluginThe CloudFormation CLI (cfn) allows you to author your own resource providers that can be used by CloudFormation.This plugin library helps to provide TypeScript runtime bindings for the execution of your providers by CloudFormation.UsageIf you are using this package to build resource providers for CloudFormation, install theCloudFormation CLI TypeScript Plugin- this will automatically install theCloudFormation CLI! A Python virtual environment is recommended.PrerequisitesPython version 3.6 or aboveSAM CLIYour choice of TypeScript IDEInstallationpip3installcloudformation-cli-typescript-pluginRefer to theCloudFormation CLI User Guidefor theCloudFormation CLIfor usage instructions.HowtoExample run:$ cfn init
Initializing new project
What's the name of your resource type?
(Organization::Service::Resource)
>> Foo::Bar::Baz
Select a language for code generation:
[1] java
[2] typescript
(enter an integer):
>> 2
Use docker for platform-independent packaging (Y/n)?
This is highly recommended unless you are experienced
with cross-platform Typescript packaging.
>> y
Initialized a new project in <>
$ cfn submit --dry-run
$ sam local invoke --event sam-tests/create.json TestEntrypointDevelopmentFor changes to the plugin, a Python virtual environment is recommended. Check out and install the plugin in editable mode:python3-mvenvenvsourceenv/bin/activate
pip3install-e/path/to/cloudformation-cli-typescript-pluginYou may also want to check out theCloudFormation CLIif you wish to make edits to that. In this case, installing them in one operation works well:pip3install\-e/path/to/cloudformation-cli\-e/path/to/cloudformation-cli-typescript-pluginThat ensures neither is accidentally installed from PyPI.For changes to the typescript library "@amazon-web-services-cloudformation/cloudformation-cli-typescript-lib" pack up the compiled javascript:npmrunbuild
npmpackYou can then install this in a cfn resource project using:npminstall../path/to/cloudformation-cli-typescript-plugin/amazon-web-services-cloudformation-cloudformation-cli-typescript-lib-1.0.1.tgzLinting and running unit tests is done viapre-commit, and so is performed automatically on commit after being installed (pre-commit install). The continuous integration also runs these checks. Manual options are available so you don't have to commit:# run all hooks on all files, mirrors what the CI runspre-commitrun--all-files# run unit tests only. can also be used for other hooks, e.g. black, flake8, pylint-localpre-commitrunpytest-localLicenseThis library is licensed under the Apache 2.0 License.
Package: cloudformation-docs
What is this?Installing this tool will provide you with the commandcfn-docs.The commandcfn-docsaccepts an AWS CloudFormation template and returns a description of the
template in markdown:cfn-docsorg-bootstrap.template.yaml>org-bootstrap.template.README.mdIn the example above we redirect the std out into a file.What does it read?The tool will read the description from the template, each parameter, each resource and each output.  It will output
those descriptions in a markdown document under suitable headers.  It also lists parameters, resources and outputs
that do not have any descriptions.
Package: cloudformation-dynamodb-export
Cloudformation-Dynamodb-ExportThis command can parse Cloudformation templates, collect DynamoDB table properties and export them as JSON.Installpip install cloudformation-dynamodb-exportUsagefrom the command line, you can run the command as belowcfnddb_export -o output-dir <template-file>OptionsYou can passParameterswith--paramoption, so that we can solveFn::SubandFn::Refinstrinsic functions.cfnddb_export -o output-dir <template-file> --param StageName=prod --param AwsRegion=us-west-2LicenseMIT
Package: cloudformation-helper
cloudformation-helperSmall tool to simplify usage of CloudFormation. Wraps around a bit of configuration, changesets and abstracts
create vs update of a stack.Free software: MIT licenseDocumentation:https://cloudformation-helper.readthedocs.io.Usagepipinstallcloudformation-helpervimstacks.cfhcfhelperstackdeployMyStackAliasSamplestacks.cfhfile:MyStackAlias:stack:MyStackNamefile:myStackFile.ymluse_changesets:falsecapabilities:-CAPABILITY_IAM-CAPABILITY_NAMED_IAMCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.3.1 (2021-09-04Add forgotten history0.3.0 (2021-09-04[BREAKING] Movecfhelper deploy ...tocfhelper stack deploy ...Addcfhelper infoAdd support ofaws_region(through env.var., command line and stack file)Add support ofaws_profile(through env.var., command line and stack file)0.2.0 (2021-07-31)Add support for capabilities.0.1.0 (2021-04-29)First release on PyPI.
Package: cloudframe
The Cloudframe Data Scientist Simple EnablerAt Cloudframe we employ teams of Data Scientists, Data Engineers, and Software Developers.  Check us out athttp://cloudframe.ioIf you're interested in joining our team as a Data Scientist see here:Bid Prediction Repo.  There you'll find a fun problem and more info about our evergreen positions for Data Scientists, Data Engineers, and Software Developers.This package contains modules that are used to smooth the data science workflow.Installationpip install cloudframeDependenciesThis package uses JSON and YAML to store and fetch model objects.pyyamljsonStructure| cloudframe/
|
|-- model_tracker/
|   |-- __init__.py
|   |-- tracker.py
|
|-- Manifest.in
|-- README.md
|-- setup.pyUsagePlaceholder... wherebestbelow is a valid model object.from cloudframe.model_tracker import tracker

tracker = tracker.project(name = 'myproject', dirpath = '\dir\to\models\')
tracker.initialize()

tracker.add(best)
Package: cloudfront-signed-cookies
cloudfront-signed-cookiesIF YOU'RE INTERESTED, go checkout myMedium blog postfor a deeper dive on what this package is doing and some usage examples.Table of ContentsInstallationUsageLicenseInstallationpip install cloudfront-signed-cookiesUsagefromcloudfront_signed_cookies.signerimportSignerimportosdefmain():"""Method #1Allow the signer to read your key from a file"""signer:Signer=Signer(cloudfront_key_id="K36X4X2EO997HM",private_key="./certs/private_key.pem",)"""Method #2Alternatively you can pass the raw contents of the key in fromsomething such as an environment variable, for container (Docker)based usage"""signer:Signer=Signer(cloudfront_key_id="K36X4X2EO997HM",private_key=os.environ.get("PRIVATE_KEY"))cookies:dict=signer.generate_cookies(Policy={"Statement":[{"Resource":"https://domain.com/somefile.txt","Condition":{"DateLessThan":{"AWS:EpochTime":1000}},}]},SecondsBeforeExpires=360,)print(cookies)main()"""{'CloudFront-Policy': 'eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoic29tZV91cmwiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjEwMDB9fX1dfQ__', 'CloudFront-Signature': 'EZHxOEAhaKB3e-XUAGI5xJdDQaWKuW-h6m8c4UYcFBkaA3Fh4~DygZUcYCj-S-qtUdrl46i8vp4RuvtDz4sL9GEVGGDniZc8iDVDqHmfllMFK-90Ge-C9lQ-umsqm-IQzaFVDS3WMbi5iAsRDpdUGfAk43ergTMvjhd~xxpVCCHZxW8uBt11kAjEoqdbMm6eVC32F-QB2HJndN9mm4d~dizvW~XjVt69fA0YjY7-TiIVKAO5ajnDaBl17AsLolLfLYl6NGBJjadLjueMCWM2DP5lXYce8RF2qW02wg8bNmth3ykPoVHFT-tgIgetOcDFDCFSnTkXXhUy3mu2wPzdKQ__', 'CloudFront-Key-Pair-Id': K36X4X2EO997HM'}"""Licensecloudfront-signed-cookiesis distributed under the terms of theMITlicense.
Package: cloud-functions-dispatch
Cloud Functions DispatchCloud Functions Dispatch gives you the ability to dispatch in-process no-response function calls to a remote cloud function by applying a decorator to your function.This is useful for tasks such as the following:update a database record separately from this processrun secondary processes as side-effects of receiving a requestfan-out of a large job into chunks that are completed independentlyBasically any task that accepts some set of serializable parameters but not any in-process state and does not need to return a value is a great candidate for dispatching.Functions are asynchronously executed with no mechanism for returning a value to the caller. From the caller's perspective, these functions are "fire and forget". Support for functions that return values may be implemented in a future version.ExampleImagine you have a function that you call every time a row in a certain table :defsave(users,context):foruserinusers:user.save()update_related(user,context)defupdate_related(user,context):entity=db.retrieve(user.id)foriteminentity.get_related():item.last_updated=context.update_timeitem.save()Note that this code is intentionally inefficient just to demonstrate the point; imagineupdate_relatedtakes 10 seconds per user and you might be doing this for thousands of users at a time. Your process will struggle for resources: time, memory, or threads will be consumed performing the work. Now imagine you are running a job like this every few seconds. Your code will choke.One approach to handle this case is to sendupdate_relatedto a separate cloud function for execution. But then you have to define the function, marshall data somehow, and then invoke the function. While these tasks are simple in theory, there are several complexities that make them challenging in practice.Usingcloud_functions_dispatch, the only change necessary to the code above is decoratingupdate_related:fromcloud_functions_dispatchimportdispatch...@dispatch# <- this is the only change necessary to make this a remote calldefupdate_related(user,context):entity=db.retrieve(user.id)foriteminentity.get_related():item.last_updated=context.update_timeitem.save()Now every time you callupdate_related, the full parameter list is serialized, compressed, and pushed to PubSub. A cloud function also containing the same function will receive the message and execute the code.Refer to theProject Documentationfor installation and usage.
Package: cloudgaze-cli
cloudgaze-cliDocumentation can be found athttps://cloudgaze.readthedocs.io/en/latest/CLI (command line interface) to call the Cloudgaze API to transform your AWS cloudformation template specifications to draw.io compatible xml files.This command line application makes a network call in the background to convert the template file. No data is stored on the remote endpoint, and you need to be connected to the internet to use this tool. The communication is encrypted using TLS.Installpip install cloudgaze-cliUsage$cloudgaze--help
Usage:cloudgaze[OPTIONS]TEMPLATE_FILEOUTPUT_FILE

Options:--helpShowthismessageandexit.$cloudgaze./path/to/template.yml./path/to/output.xml
resultswrittento'/abs/path/to/output.xml'ExamplesFor example, the analytics template file for theAWS realworld serverless application examplewill render the following diagram in draw.io:To see the diagram in the above form, the output from cloudgaze have to be opened in draw.io or a compatible application. The diagram can then be modified in the application.The resources will be connected with arrows to indicate a dependency.
Package: cloudgeass
NoteNowcloudgeasshas anofficial documentation page on readthedocs! possui umadocumentação oficialno readthedocs! Check it out to get access to the latest features!QuickstartTo start using the package, just install it usingpip(or any other Python dependency management of your choose) as:pipinstallcloudgeassYou may want to installcloudgeassin aPython virtual environmentto get a good control of your project or application dependencies. If you don't know what this is about, feel free to take a look at this excellentarticle from Real Python.ModulesGetting straight to the point, eachcloudgeassmodule represents an AWS service that contains at least one class and a bunch of methods built from both boto's source client and resource for that service.In other words, some modules that you can find here are:cloudgeass.aws.s3for working with S3 servicecloudgeass.aws.ec2for working with EC2 servicecloudgeass.aws.secretsfor working with Secrets Manager serviceand some othersClassesEach one of the aforementioned modules have at least one class that can be imported on user's application in order to provide access to all features for that given AWS service. So, we have:cloudgeass.aws.s3.S3Clientclass with methods to operate with S3 servicecloudgeass.aws.ec2.EC2Clientclass with methods to operate with EC2 servicecloudgeass.aws.secrets.SecretsManagerClientclass with methods to operate with Secrets Manager serviceand some othersAttributesAllcloudgeass'service classes are initialized with a set of predefined attributes to make the work easier. Those basic attributes are:Service class attributeDescriptionself.loggerA preconfigured logger object to build and stream informative log messagesself.clientA boto3 client for the given serviceself.resourceA boto3 resource for the given serviceThe attributes can be externally accessed for all class instances created on an application. This means users can build an application using bothcloudgeassand source boto3 code.MethodsFinally, each service class has its own set of methods that, in fact, enables the power of usingcloudgeassto do simple tasks in an AWS environment. To mention some of them, we have:S3Client.get_last_date_partition()to get the last date partition from a table stored in S3EC2Client.get_default_vpc_id()to get the default VPC ID of an AWS accountSecretsManagerClient.get_secret_string()to get a secret string given a secret IDContact meGitHub:@ThiagoPaniniLinkedIn:Thiago PaniniHashnode:panini-tech-labDevTo:thiagopaniniReferencesPythonPython - Packaging Python ProjectsStack Overflow - Reading Pandas DataFrame from S3DocsNumPy docstringsEduardo Mendes - Live de Python 189 - MkDocsMkDocspmdown-extensionsGitHub - MkDocs ThemesGitHub - Material Theme for MkDocsMaterial for MkDocs - SetupGithubGitHub Actions - pypa/gh-action-pypi-publishMedium - Major, Minor and PatchMedium - Automate PyPI Releases with GitHub ActionsTestsCodecov - Setting ThresholdCodecov - About the Codecov YAMLCodecov - Status ChecksCodecov - codecov.yml ReferenceCodecov - Ignore Paths
Package: cloudgenerator
cloudgeneratorThis package is in development. If you want to contribute, you can write to this email:noticedcloud@gmail.com.Developed by NoticedCloud.Generating a passwordIf you want to generate a password you can use generate_password()import cloudgenerator

password = cloudgenerator.generate_password()
print(password)Checking the safety of a passowrdYou can check the safety of a password using calculate_complexity() it will give a grade from 1 to 5import cloudgenerator

password = cloudgenerator.generate_password()
safety = cloudgenerator.calculate_complexity(password)
print(safety.grade)Generating a tokenYou can generate a token using generate_token()import cloudgenerator

token = cloudgenerator.generate_token()
print(token)And more :)