Saravanan666/pypi-org huggingface dataset:
Package: cloudcomponents.cdk-lambda-at-edge-pattern
@cloudcomponents/cdk-lambda-at-edge-patternCDK Constructs for Lambda@Edge pattern: HttpHeadersInstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-lambda-at-edge-patternPython:pipinstallcloudcomponents.cdk-lambda-at-edge-patternHow to useimport{StaticWebsite}from'@cloudcomponents/cdk-static-website';import{OriginMutation}from'@cloudcomponents/cdk-lambda-at-edge-pattern';import{RemovalPolicy,Stack,StackProps,aws_route53}from'aws-cdk-lib';import{Construct}from'constructs';exportclassStaticWebsiteStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);consthostedZone=aws_route53.HostedZone.fromLookup(this,'HostedZone',{domainName:'cloudcomponents.org',});//CreatealambdaatedgeconstoriginMutation=newOriginMutation(stack,'OriginMutation');newStaticWebsite(this,'StaticWebsite',{hostedZone,domainNames:['cloudcomponents.org','www.cloudcomponents.org'],edgeLambdas:[originMutation],removalPolicy:RemovalPolicy.DESTROY,});}}Cloudfront Distributionnewcloudfront.Distribution(this,'myDist',{defaultBehavior:{origin:neworigins.S3Origin(myBucket),edgeLambdas:[httpHeaders],},});HttpHeadersconsthttpHeaders=newHttpHeaders(this,'HttpHeaders',{httpHeaders:{'Content-Security-Policy':"default-src 'none'; img-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; object-src 'none'; connect-src 'self'",'Strict-Transport-Security':'max-age=31536000; includeSubdomains; preload','Referrer-Policy':'same-origin','X-XSS-Protection':'1; mode=block','X-Frame-Options':'DENY','X-Content-Type-Options':'nosniff','Cache-Control':'no-cache',},});OriginMutationhttps://chrisschuld.com/2020/05/gatsby-hosting-on-cloudfront/constoriginMutation=newOriginMutation(stack,'OriginMutation');API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-pull-request-approval-rule
@cloudcomponents/cdk-pull-request-approval-ruleCodeCommit pull request approval rules to enforcing your pull request workflowInstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-pull-request-approval-rulePython:pipinstallcloudcomponents.cdk-pull-request-approval-ruleHow to useimport{ApprovalRuleTemplate,ApprovalRuleTemplateRepositoryAssociation}from'@cloudcomponents/cdk-pull-request-approval-rule';import{PullRequestCheck}from'@cloudcomponents/cdk-pull-request-check';import{Stack,StackProps}from'aws-cdk-lib';import{BuildSpec}from'aws-cdk-lib/aws-codebuild';import{Repository}from'aws-cdk-lib/aws-codecommit';import{Construct}from'constructs';exportclassPullRequestStackextendsStack{constructor(scope:Construct,id:string,props?:StackProps){super(scope,id,props);constrepository=newRepository(this,'Repository',{repositoryName:'pr-check-repository',});const{approvalRuleTemplateName}=newApprovalRuleTemplate(this,'ApprovalRuleTemplate',{approvalRuleTemplateName:'template-name',template:{approvers:{numberOfApprovalsNeeded:1,},},});newApprovalRuleTemplateRepositoryAssociation(this,'ApprovalRuleTemplateRepositoryAssociation',{approvalRuleTemplateName,repository,});newPullRequestCheck(this,'PullRequestCheck',{repository,buildSpec:BuildSpec.fromSourceFilename('prcheck.yml'),});}}ApprovalRuleOverridden notificationimport{ApprovalRuleTemplate,ApprovalRuleTemplateRepositoryAssociation}from'@cloudcomponents/cdk-pull-request-approval-rule';import{PullRequestCheck}from'@cloudcomponents/cdk-pull-request-check';import{Stack,StackProps}from'aws-cdk-lib';import{BuildSpec}from'aws-cdk-lib/aws-codebuild';import{Repository}from'aws-cdk-lib/aws-codecommit';import{SnsTopic}from'aws-cdk-lib/aws-events-targets';import{Topic}from'aws-cdk-lib/aws-sns';import{Construct}from'constructs';exportclassPullRequestStackextendsStack{constructor(scope:Construct,id:string,props?:StackProps){super(scope,id,props);constrepository=newRepository(this,'Repository',{repositoryName:'pr-check-repository',});const{approvalRuleTemplateName}=newApprovalRuleTemplate(this,'ApprovalRuleTemplate',{approvalRuleTemplateName:'template-name',template:{approvers:{numberOfApprovalsNeeded:1,},},},);construleAsscociation=newApprovalRuleTemplateRepositoryAssociation(stack,'ApprovalRuleTemplateRepositoryAssociation',{approvalRuleTemplateName,repository,},);consttopic=newTopic(stack,'Topic');ruleAsscociation.onOverridden('overridden',{target:newSnsTopic(topic),});//ApprovesthepullrequestnewPullRequestCheck(this,'PullRequestCheck',{repository,buildSpec:BuildSpec.fromSourceFilename('prcheck.yml'),});}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-responsive-email-template
@cloudcomponents/cdk-responsive-email-templateResponsivemjmlemail template for aws sesInstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-responsive-email-templatePython:pipinstallcloudcomponents.cdk-responsive-email-templateHow to useimport{ResponsiveEmailTemplate,TemplatePart}from'@cloudcomponents/cdk-responsive-email-template';import{Stack,StackProps}from'aws-cdk-lib';import{Construct}from'constructs';exportclassResponsiveEmailTemplateStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);newResponsiveEmailTemplate(this,'EmailTemplate',{templateName:'demo',subjectPart:'cloudcomponents - {{ title }}',textPart:TemplatePart.fromInline('text message'),htmlPart:TemplatePart.fromInline(`<mjml><mj-head><mj-title>cloudcomponents-{{title}}</mj-title></mj-head><mj-body><mj-section><mj-column><mj-text>Hello{{name}}!</mj-text></mj-column></mj-section></mj-body></mjml>`),parsingOptions:{beautify:true,},});}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-s3-antivirus
@cloudcomponents/cdk-s3-antivirusAntivirus for Amazon S3InstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-s3-antivirusPython:pipinstallcloudcomponents.cdk-s3-antivirusHow to useimport{Scanner}from'@cloudcomponents/cdk-s3-antivirus';import{RemovalPolicy,Stack,StackProps}from'aws-cdk-lib';import{SnsDestination}from'aws-cdk-lib/aws-lambda-destinations';import{Bucket}from'aws-cdk-lib/aws-s3';import{Topic}from'aws-cdk-lib/aws-sns';import{EmailSubscription}from'aws-cdk-lib/aws-sns-subscriptions';import{Construct}from'constructs';exportclassS3AntivirusStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);constbucket=newBucket(this,'Bucket',{autoDeleteObjects:true,removalPolicy:RemovalPolicy.DESTROY,});consttopic=newTopic(this,'Topic');if(process.env.DEVSECOPS_TEAM_EMAIL){topic.addSubscription(newEmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL));}constscanner=newScanner(this,'Scanner',{onResult:newSnsDestination(topic),onError:newSnsDestination(topic),});scanner.addSourceBucket(bucket);}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-secret-key
@cloudcomponents/cdk-secret-keyProvide secret keys to lambdasInstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-secret-keyPython:pipinstallcloudcomponents.cdk-secret-keyHow to useimport{SecretKey}from'@cloudcomponents/cdk-secret-key';constsecretKey=SecretKey.fromPlainText(process.env.SECRET_KEYasstring);constsecretKeyString=secretKey.serialize(),Seecloudcomponents/lambda-utils-nodejsfor the counterpart in lambda functionsAPI ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-static-website
@cloudcomponents/cdk-static-websiteCdk component that creates a static website using S3, configures CloudFront (CDN) and maps a custom domain via Route53 (DNS)InstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-static-websitePython:pipinstallcloudcomponents.cdk-static-websiteHow to useimport{StaticWebsite}from'@cloudcomponents/cdk-static-website';import{RemovalPolicy,Stack,StackProps,aws_route53}from'aws-cdk-lib';import{Construct}from'constructs';exportclassStaticWebsiteStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);consthostedZone=aws_route53.HostedZone.fromLookup(this,'HostedZone',{domainName:'cloudcomponents.org',});newStaticWebsite(this,'StaticWebsite',{hostedZone,domainNames:['cloudcomponents.org','www.cloudcomponents.org'],removalPolicy:RemovalPolicy.DESTROY,});}}Single page application (SPA)import{StaticWebsite}from'@cloudcomponents/cdk-static-website';import{RemovalPolicy,Stack,StackProps,aws_route53}from'aws-cdk-lib';import{Construct}from'constructs';exportclassStaticWebsiteStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);consthostedZone=aws_route53.HostedZone.fromLookup(this,'HostedZone',{domainName:'cloudcomponents.org',});newStaticWebsite(this,'StaticWebsite',{hostedZone,domainNames:['cloudcomponents.org','www.cloudcomponents.org'],errorResponses:[{httpStatus:404,responseHttpStatus:200,ttl:props.ttl??Duration.seconds(300),responsePagePath:'/index.html',},],removalPolicy:RemovalPolicy.DESTROY,});}}Lambda at edgeimport{StaticWebsite}from'@cloudcomponents/cdk-static-website';import{OriginMutation}from'@cloudcomponents/cdk-lambda-at-edge-pattern';import{RemovalPolicy,Stack,StackProps,aws_route53}from'aws-cdk-lib';import{Construct}from'constructs';exportclassStaticWebsiteStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);consthostedZone=aws_route53.HostedZone.fromLookup(this,'HostedZone',{domainName:'cloudcomponents.org',});constoriginMutation=newOriginMutation(stack,'OriginMutation');newStaticWebsite(this,'StaticWebsite',{hostedZone,domainNames:['cloudcomponents.org','www.cloudcomponents.org'],edgeLambdas:[originMutation],removalPolicy:RemovalPolicy.DESTROY,});}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-stripe-webhook
@cloudcomponents/cdk-stripe-webhookCreate, update and delete stripe webhooks with your app deploymentInstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-stripe-webhookPython:pipinstallcloudcomponents.cdk-stripe-webhookHow to useEventBus Producerimport{SecretKey,SecretKeyStore}from'@cloudcomponents/cdk-secret-key';import{StripeWebhook,StripeEventBusProducer}from'@cloudcomponents/cdk-stripe-webhook';import{Stack,StackProps,aws_ssm}from'aws-cdk-lib';import{Construct}from'constructs';exportclassStripeWebhookEventBusStackextendsStack{constructor(scope:Construct,id:string,props?:StackProps){super(scope,id,props);if(typeofprocess.env.SECRET_KEY==='undefined'){thrownewError('environment variable SECRET_KEY undefined');}constsecretKey=SecretKey.fromPlainText(process.env.SECRET_KEY);constendpointSecretParameter=aws_ssm.StringParameter.fromSecureStringParameterAttributes(this,'Param',{parameterName:'stripe',version:1,});constproducer=newStripeEventBusProducer(this,'Producer',{secretKey,endpointSecret:SecretKey.fromSSMParameter(endpointSecretParameter),});constevents=['charge.failed','charge.succeeded'];constendpointSecretStore=SecretKeyStore.fromSSMParameter(endpointSecretParameter);newStripeWebhook(this,'StripeWebhook',{secretKey,url:producer.url,events,logLevel:'debug',endpointSecretStore,});}}Custom Handlerimport{SecretKey}from'@cloudcomponents/cdk-secret-key';import{StripeWebhook}from'@cloudcomponents/cdk-stripe-webhook';import{Stack,StackProps,aws_apigateway}from'aws-cdk-lib';import{Construct}from'constructs';exportclassStripeWebhookStackextendsStack{constructor(scope:Construct,id:string,props?:StackProps){super(scope,id,props);constapi=newaws_apigateway.RestApi(this,'Endpoint');api.root.addMethod('POST');if(typeofprocess.env.SECRET_KEY==='undefined'){thrownewError('environment variable SECRET_KEY undefined');}constsecretKey=SecretKey.fromPlainText(process.env.SECRET_KEY);constevents=['charge.failed','charge.succeeded'];newStripeWebhook(this,'StripeWebhook',{secretKey,url:api.url,events,logLevel:'debug',});}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-temp-stack
@cloudcomponents/cdk-temp-stackA stack that destroys itself after a given time (ttl)InstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-temp-stackPython:pipinstallcloudcomponents.cdk-temp-stackHow to use//temp-infra-app.ts#!/usr/bin/env nodeimport'source-map-support/register';import{App,Duration}from'aws-cdk-lib';import{TempInfraStack}from'./temp-infra-stack';constapp=newApp();newTempInfraStack(app,'TempInfraStack',{env:{region:process.env.DEFAULT_REGION,account:process.env.CDK_DEFAULT_ACCOUNT,},ttl:Duration.minutes(10),});//temp-infra-stack.tsimport{TempStack,TempStackProps}from'@cloudcomponents/cdk-temp-stack';import{Vpc}from'aws-cdk-lib/aws-ec2';import{Construct}from'constructs';exportclassTempInfraStackextendsTempStack{constructor(scope:Construct,id:string,props:TempStackProps){super(scope,id,props);newVpc(this,'VPC');}}TimeToLive ConstructAlternatively, you can also add the TimeToLive construct to your stack//yourstackimport{TimeToLive}from'@cloudcomponents/cdk-temp-stack';import{Stack,StackProps,Duration}from'aws-cdk-lib';import{Construct}from'constructs';exportclassYourStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);newTimeToLive(this,'TimeToLive',{ttl:Duration.minutes(10),});}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloudcomponents.cdk-wordpress
@cloudcomponents/cdk-wordpressCDK Construct to deploy wordpressInstallTypeScript/JavaScript:npmi@cloudcomponents/cdk-wordpressPython:pipinstallcloudcomponents.cdk-wordpressHow to useimport{Wordpress}from'@cloudcomponents/cdk-wordpress';import{RemovalPolicy,Stack,StackProps,aws_route53}from'aws-cdk-lib';import{Construct}from'constructs';exportclassWordpressStackextendsStack{constructor(scope:Construct,id:string,props:StackProps){super(scope,id,props);consthostedZone=aws_route53.PublicHostedZone.fromLookup(this,'HostedZone',{domainName:'cloudcomponents.org',});newWordpress(this,'Wordpress',{domainName:'blog.cloudcomponents.org',domainZone:hostedZone,removalPolicy:RemovalPolicy.DESTROY,offloadStaticContent:true,//Supportforplugine.g.`WPOffloadMediaforAmazonS3`});}}API ReferenceSeeAPI.md.ExampleSee more completeexamples.LicenseMIT
Package: cloud-composer-dag-test-utils
Cloud Composer DAG Testing UtilityThis package is used internally to unit test the validity of all Cloud Composer sample DAGs. It is not supported for external production use. Thelatest release can be found on PyPI.InstructionsAdd the following to yourrequirements-test.txtfile:cloud_composer_dag_test_utilsImport the internal unit testing moduleimportinternal_unit_testingTest your DAGdeftest_dag_import():# Set any variables if your DAG requires themmodels.Variable.set('gcs_bucket','example_bucket')from.importmy_dagasmodule# Check for DAG validityinternal_unit_testing.assert_has_valid_dag(module)For more examples, refer to theworkflowsdirectory.
Package: cloudconformity
Cloud Conformity Template Scanner API toolThis is a python package to Cloud Conformity Template Scanner.InstallingTo start using we need to setup the config.ini file first.
Navigate to the install pip package.Add your apiKey. We have created and environment variableapi= os.environ.get('apiKey')Endpoint Region is set as US(Oregon - us-west-2)For reference, check out the conformity API documentation.https://github.com/cloudconformity/documentation-apiRunning a scanFinally, we can scan a CloudFormation Template for misconfigurations before deployment into your AWS infrastructure.We can scan by default or failures using either [all, fail]
Alternatively, we can filter by severity [Extreme, Very High, High, Medium, Low]For example, a scan looking for any failure in your templatecloudconformity --scan fail C:\MyExample\template.yamlAnother example, a scan looking for extreme failures in your templatecloudconformity --scan extreme C:\MyExample\template.yamlTo see the original json response from API callcloudconformity --scan default C:\MyExample\template.yaml
Package: cloud-conformity
cloud-conformity-python-libraryPython library to interact with Cloud Conformity APISupported FunctionalityNot all APIs are covered by this library yet. You can find the list of supported APIs below:External IDs APIGet Organisation External IDAccounts APICreate AccountList AccountsUpdate AccountDelete AccountUpdate Account Bot SettingSettings APIList Communication SettingsDelete Communication SettingsProfiles APIList ProfilesGet ProfileApply Profile to AccountsReport Configs APICreate Report ConfigRequirementsYou should have the following tools to install this library:Python 3.X.XVirtualenv(Optional but recommended)InstallationYou can usepipandvirtualenv. Create a new virtual environment, then activate the environment and install:$virtualenv-ppython3<path_to_anywhere_you_want_to>
$source<path_to_anywhere_you_want_to>/bin/activate
$pipinstallcloud-conformityThe other way, you can install it to your system's Python 3 (withoutvirtualenv).
In that case,sudois most likely be required andpip3is the command you should be using to install the package to your Python 3:$sudopip3installcloud-conformityTest Your InstallationIf you are using virtualenv, make sure the environment is activated. If not, make sure you are using the correct python:$ python3In the python interpreter, insert the following statements:>>> from cloud_conformity import CloudConformity
>>> CloudConformityThe output should be:<class 'cloud_conformity.cloud_conformity.CloudConformity'>Maintainer GuideAfter updating the code, make sure to update the code version onsetup.pyFollowthis guideto ship the code to PyPi:AuthorRafi Kurnia PutraLicenseApache 2 Licensed. SeeLICENSEfor full details.
Package: cloudconnect2
CloudConnectThis python package allows you easily retrieve destination information from the SAP BTPUsagefromcloudconnect2importload_destinationdestinationName="ABC API Name"destinationService="Service"debugMode=Falsedestination=load_destination(destinationName,destinationService,debugMode)The destination name determines the name of the API destination in the SAP BTP you want to retrieveThe destination service instead is the name of the service binding in the cloud foundry runtime the application wants to accessthe debug mode determines if we want to recieve just the toke or for development purpose only also other informationInstallationTo install the package execute the following commandpython3 -m pip install git+https://github.com/Oviing/CloudConnect.gitIf you are using jupyter notebook you have to use instead the following command!python3 -m pip install git+https://github.com/Oviing/CloudConnect.gitOr easy via pippip install cloudconnect2
Package: cloudconsolelink
What is cloudconsolelink?This project for generate console links for AWS, GCP and Azure cloud resourcesInstallRunpip install cloudconsolelinkto install our codeUsageImport PackageFor AWSfrom cloudconsolelink.clouds.aws import AWSLinkerFor Azurefrom cloudconsolelink.clouds.azure import AzureLinkerFor GCPfrom cloudconsolelink.clouds.gcp import GCPLinkerTo get console linkcall methodget_console_link()The Followings Are The Some ExampleAWS:fromcloudconsolelink.clouds.awsimportAWSLinkeraws=AWSLinker()arn="arn:aws:ec2:us-east1:1234567890:instance/instance1"console_link=aws.get_console_link(arn=arn)Azure Management:fromcloudconsolelink.clouds.azureimportAzureLinkerazure=AzureLinker()id="/subscriptions/5592e8dc/resourceGroups/testgroup"primary_ad_domain_name="QA123.onmicrosoft.com"console_link=azure.get_console_link(id=id,primary_ad_domain_name=primary_ad_domain_name)Azure IAM:fromcloudconsolelink.clouds.azureimportAzureLinkerazure=AzureLinker()id="1234567890"iam_entity_type="user"console_link=azure.get_console_link(id=id,iam_entity_type=iam_entity_type)GCP:fromcloudconsolelink.clouds.gcpimportGCPLinkergcp=GCPLinker()bucket_name="xyz"resource_name="storage_bucket"console_link=gcp.get_console_link(bucket_name=bucket_name,resource_name=resource_name)get_console_link() parameters discription:AWS:arn: arn of resourceAzure:IAM:iam_entity_type: type of iam resource(user, group, application)id: object idManagement:id: id of entityprimary_ad_domain_name: name of the active derectory primary domainGCP:resource_name: name of resource(storage_bucket, compute_instance, compute_instance_vpc_network, compute_instance_vpc_network_subnet, compute_instance_disk, compute_firewall_rule, compute_forwarding_rule, api, api_config, api_gateway, big_table_instance, big_table_cluster, big_table, big_table_backup, cloud_function, kms_key_ring, kms_key, dns_zone, dns_resource_record_set, gke_cluster, sql_instance, sql_user, service_account, service_account_key, iam_role, iam_group, iam_user, firestore_collection, cloud_run_revision, cloud_run_service)project_idregionzonebucket_nameinstance_namenetwork_namesubnet_namerule_nameapi_namemanaged_service_nameapi_config_nameapi_configuration_idapi_gateway_namebigtable_instance_namebigtable_cluster_idbigtable_table_idcloud_function_namekms_key_ring_namekms_key_namedns_zone_namedns_rrset_namedns_typegke_cluster_namesql_instance_nameservice_account_unique_idrole_idgroup_unique_idfirestore_collection_namecloud_run_service_nameWho uses cloudconsolelink?Cloudanix{Your company here} :-)If your organization uses Cloudconsolelink, please file a PR and update this list.
Package: cloudcontrol
DescriptionCloudControl gives you a simplified interface for dealing with a bunch
of machines in the cloud.  With simple Python syntax, you can script
all of your remote machines simultaneously.UsageThis simple example shows a way to list the running processes on
your appservers:from cloudcontrol import Role

appserver = Role("machine1@example.com", "machine2@example.com", "machine3@example.com")

appserver.run("ps aux")