Best Python code snippet using localstack_python
make.py
Source:make.py
...33def configure_pdoc(**kwargs):34 pdoc.render.configure(**{**PDOC_CONFIG, **kwargs})35def run_pdoc(source, output):36 pdoc.pdoc(source, output_directory=output, format='html')37def get_documentation_versions(directory):38 versions = [version.Version(i) for i in os.listdir(directory) if os.path.isdir(os.path.join(directory, i))]39 versions.sort(reverse=True)40 versions_grouped = {}41 while versions:42 item = versions.pop(0)43 group = [item]44 index = 045 while index < len(versions):46 if versions[index].major == item.major and versions[index].minor == item.minor:47 group.append(versions.pop(index))48 else:49 index += 150 group.sort()51 versions_grouped['docs/' + str(group[-1])] = [f'docs/{str(i)}' for i in reversed(group[:-1])]52 return versions_grouped53def custom_navigation_links():54 links = {}55 links['API Version'] = get_documentation_versions(OUTPUT_DIR / 'docs')56 for directory in os.listdir(HERE / 'source'):57 full_directory = HERE / 'source' / directory58 if not os.path.isdir(full_directory):59 continue60 category = directory.capitalize()61 links[category] = []62 for file in os.listdir(full_directory):63 if not os.path.isfile(full_directory / file):64 continue65 if file.startswith('__') or not file.endswith('.py'):66 continue67 links[category].append(f'{directory}/{file.rstrip(".py")}.html')68 if links[category]:69 links[category].sort()...
__init__.pyi
Source:__init__.pyi
1"""2Main interface for apigateway service.3Usage::4 ```python5 import boto36 from mypy_boto3_apigateway import (7 APIGatewayClient,8 Client,9 GetApiKeysPaginator,10 GetAuthorizersPaginator,11 GetBasePathMappingsPaginator,12 GetClientCertificatesPaginator,13 GetDeploymentsPaginator,14 GetDocumentationPartsPaginator,15 GetDocumentationVersionsPaginator,16 GetDomainNamesPaginator,17 GetGatewayResponsesPaginator,18 GetModelsPaginator,19 GetRequestValidatorsPaginator,20 GetResourcesPaginator,21 GetRestApisPaginator,22 GetSdkTypesPaginator,23 GetUsagePaginator,24 GetUsagePlanKeysPaginator,25 GetUsagePlansPaginator,26 GetVpcLinksPaginator,27 )28 session = boto3.Session()29 client: APIGatewayClient = boto3.client("apigateway")30 session_client: APIGatewayClient = session.client("apigateway")31 get_api_keys_paginator: GetApiKeysPaginator = client.get_paginator("get_api_keys")32 get_authorizers_paginator: GetAuthorizersPaginator = client.get_paginator("get_authorizers")33 get_base_path_mappings_paginator: GetBasePathMappingsPaginator = client.get_paginator("get_base_path_mappings")34 get_client_certificates_paginator: GetClientCertificatesPaginator = client.get_paginator("get_client_certificates")35 get_deployments_paginator: GetDeploymentsPaginator = client.get_paginator("get_deployments")36 get_documentation_parts_paginator: GetDocumentationPartsPaginator = client.get_paginator("get_documentation_parts")37 get_documentation_versions_paginator: GetDocumentationVersionsPaginator = client.get_paginator("get_documentation_versions")38 get_domain_names_paginator: GetDomainNamesPaginator = client.get_paginator("get_domain_names")39 get_gateway_responses_paginator: GetGatewayResponsesPaginator = client.get_paginator("get_gateway_responses")40 get_models_paginator: GetModelsPaginator = client.get_paginator("get_models")41 get_request_validators_paginator: GetRequestValidatorsPaginator = client.get_paginator("get_request_validators")42 get_resources_paginator: GetResourcesPaginator = client.get_paginator("get_resources")43 get_rest_apis_paginator: GetRestApisPaginator = client.get_paginator("get_rest_apis")44 get_sdk_types_paginator: GetSdkTypesPaginator = client.get_paginator("get_sdk_types")45 get_usage_paginator: GetUsagePaginator = client.get_paginator("get_usage")46 get_usage_plan_keys_paginator: GetUsagePlanKeysPaginator = client.get_paginator("get_usage_plan_keys")47 get_usage_plans_paginator: GetUsagePlansPaginator = client.get_paginator("get_usage_plans")48 get_vpc_links_paginator: GetVpcLinksPaginator = client.get_paginator("get_vpc_links")49 ```50"""51from .client import APIGatewayClient52from .paginator import (53 GetApiKeysPaginator,54 GetAuthorizersPaginator,55 GetBasePathMappingsPaginator,56 GetClientCertificatesPaginator,57 GetDeploymentsPaginator,58 GetDocumentationPartsPaginator,59 GetDocumentationVersionsPaginator,60 GetDomainNamesPaginator,61 GetGatewayResponsesPaginator,62 GetModelsPaginator,63 GetRequestValidatorsPaginator,64 GetResourcesPaginator,65 GetRestApisPaginator,66 GetSdkTypesPaginator,67 GetUsagePaginator,68 GetUsagePlanKeysPaginator,69 GetUsagePlansPaginator,70 GetVpcLinksPaginator,71)72Client = APIGatewayClient73__all__ = (74 "APIGatewayClient",75 "Client",76 "GetApiKeysPaginator",77 "GetAuthorizersPaginator",78 "GetBasePathMappingsPaginator",79 "GetClientCertificatesPaginator",80 "GetDeploymentsPaginator",81 "GetDocumentationPartsPaginator",82 "GetDocumentationVersionsPaginator",83 "GetDomainNamesPaginator",84 "GetGatewayResponsesPaginator",85 "GetModelsPaginator",86 "GetRequestValidatorsPaginator",87 "GetResourcesPaginator",88 "GetRestApisPaginator",89 "GetSdkTypesPaginator",90 "GetUsagePaginator",91 "GetUsagePlanKeysPaginator",92 "GetUsagePlansPaginator",93 "GetVpcLinksPaginator",...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!