从提供商网站获取云产品描述的包。

cloud-products的Python项目详细描述


云产品

pypi VersionLatest TagDependenciesBuild

用于从具有缓存支持的云提供商网站获取云产品和产品描述的包。在

目前支持从 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 ...

云产品是在麻省理工学院授权下发布的。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
jOOQ中的java,为什么我会出现“在org中找不到setter、adder或field”的错误。约克。util。jaxb。“masterDataTables”的生成器?   java在web应用程序中放置ServiceLoader配置文件的位置   Java扫描器前瞻   Java:如何确保命令行编译使用正确的Java版本?   java Android画布。drawCircle()错误。持续绘制椭圆而不是圆   Java:流中的使用者接口无法按预期工作   java为什么GridBagLayout认为我的组件不适合容器?   java将foreach JSP变量作为参数传递给javascript函数   java如何调用webservice而不为其创建任何客户端?   java Sqlite中是否有特定的有效表名   java如何编写查询来比较具有时间间隔的两个时间戳之间的差异   私有问题列表上的java迭代   Java通配符引用   Java中基于静默的wav文件分割   java我怎么知道一周中的哪一天,一个月的第一天?   java实际Jackrabbit/Oak指南和文档   java我想在特定长度后拆分一个字符串,而不剪切任何单词,而不是相等的字符串