从提供商网站获取云产品描述的包。
cloud-products的Python项目详细描述
云产品
用于从具有缓存支持的云提供商网站获取云产品和产品描述的包。在
目前支持从 https://aws.amazon.com/products
GCP和Azure产品信息将及时添加。在
从PyPi安装
pip install cloud-products
示例1:列出AWS产品
^{pr2}$输出示例:
alexaforbusiness: Alexa for Business: Empower your Organization with Alexa
amazon-mq: Amazon MQ: Managed Message Broker for ActiveMQ
amplify: AWS Amplify: Build and deploy mobile and web applications
api-gateway: Amazon API Gateway: Build, Deploy, and Manage APIs
...
示例2:以行列表的形式获取产品说明
fromcloud_products.awsimportAwsCrawlercloud_products=AwsCrawler()product=cloud_products.get_products()[0]lines=cloud_products.get_product_text(product)print(lines[4])
输出示例:
Alexa for Business is a service that enables organizations and employees to use Alexa to ...
示例3:获取匹配产品的用法:
fromcloud_productsimportawscloud_products=aws.AwsCrawler()sagemaker_products=cloud_products.get_products_matching("sagemaker")sagemaker_description=cloud_products.get_product_text(sagemaker_products[0])print(sagemaker_description[3])
输出示例:
Amazon SageMaker is a fully managed service that provides every developer and data scientist with ...
示例4:将产品描述保存到文件:
fromcloud_productsimportawscloud_products=aws.AwsCrawler()forproductincloud_products.get_products():print(f"Saving {product.name}")cloud_products.save_product(product,output_path)
输出示例:
Saving Alexa for Business
Saving Amazon MQ
Saving AWS Amplify
Saving Amazon API Gateway
...
示例5:获取产品的Pandas数据帧:
注意:需要安装可选的pandas
包。在
此数据框包含产品名称、代码、url和完整描述。在
fromcloud_products.awsimportAwsCrawlerdf=AwsCrawler().get_products_as_df()print(df)
输出示例:
name std_name code ... seed_url desc product_text
0 Alexa for Business alexa for business alexaforbusiness ... https://aws.amazon.com/products/ Empower your Organization with Alexa Alexa for Business Use Alexa for work Get Star...
1 Amazon MQ aws mq amazon-mq ... https://aws.amazon.com/products/ Managed Message Broker Service Amazon MQ Fully managed service for open sourc...
2 AWS Amplify aws amplify amplify ... https://aws.amazon.com/products/ Build and deploy mobile and web applications AWS Amplify Fastest, easiest way to build mobi...
3 Amazon API Gateway aws api gateway api-gateway ... https://aws.amazon.com/products/ Build, Deploy, and Manage APIs Amazon API Gateway Create, maintain, and secur...
4 AWS App Mesh aws app mesh app-mesh ... https://aws.amazon.com/products/ Monitor and control microservices AWS App Mesh Application-level networking for ...
云产品是在麻省理工学院授权下发布的。在
- 项目
标签: