Python  Library

Python Library

1660628700

Alibaba Cloud Software Development Kit for Python

The Alibaba Cloud Python Software Development Kit (SDK) allows you to access Alibaba Cloud services such as Elastic Compute Service (ECS), Object Storage Service (OSS), and Resource Access Management (RAM). You can access Alibaba Cloud services without the need to handle API related tasks, such as signing and constructing your requests.

This document introduces how to obtain and call Alibaba Cloud Python SDK.

Troubleshoot

Troubleshoot Provide OpenAPI diagnosis service to help developers locate quickly and provide solutions for developers through RequestID or error message.

Online Demo

API Workbench provides the ability to call the cloud product OpenAPI online, and dynamically generate SDK Example code and quick retrieval interface, which can significantly reduce the difficulty of using the cloud API. It is highly recommended. 

Documentation

  • Requirements
  • Installation
  • Client & Credentials
  • Timeout
  • Proxy Configurations
  • Log
  • Endpoint
  • Https
  • Debug
  • Exception

Prerequisites

To use Alibaba Cloud Python SDK, you must have an Alibaba Cloud account as well as an AccessKey.

The AccessKey is required when initializing AcsClient. You can create an AccessKey in the Alibaba Cloud console. For more information, see Create an AccessKey.

Note: To increase the security of your account, we recommend that you use the AccessKey of the RAM user to access Alibaba Cloud services.

To use Alibaba Cloud Python SDK to access the APIs of a product, you must first activate the product on the Alibaba Cloud console if required.

Alibaba Cloud Python SDK requires 2.7.x, and Python 3.x.

Install Python SDK

Alibaba Cloud Python SDK supports Python 2.7.x, and Python 3.x. Run python --version to check your version of Python.

You can install the Alibaba Cloud Python SDK using the following two methods. Regardless of which method and cloud service are used, the core library aliyun-python-sdk-core must be installed.

Install with pip

Python SDK uses a common package management tool named pip. If pip is not installed, see the pip user guide to install pip.

Run the following command to install the individual libraries of Alibaba Cloud services:

# Install the core library
pip install aliyun-python-sdk-core
# Install the ECS management library
pip install aliyun-python-sdk-ecs
# Install the RDS management library
pip install aliyun-python-sdk-rds

Use Python SDK

Import the required modules as follows:

from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdkecs.request.v20140526 import DescribeInstancesRequest
from aliyunsdkecs.request.v20140526 import StopInstanceRequest

Initialize the AcsClient instance:

where:

  • access-key-id is the Accesskey ID for your account.
  • access-key-secret is the AccessKey secret for your account.
  • region-id is the ID of the region where the service is called. For a list of region IDs, see Regions and zones.
client = AcsClient(
    "<access-key-id>",
    "<access-key-secret>",
    "<region-id>"
);

Initialize a request and print response.

# Initialize a request and set parameters
request = DescribeInstancesRequest.DescribeInstancesRequest()
request.set_PageSize(10)
# Print response
response = client.do_action_with_exception(request)
print response

Code example

The following example shows how to query a list of ECS instances in a specific region using DescribeInstances. Substitute the values for your-access-key-id, your-access-key-secret, and your-region-id.

# -*- coding: utf8 -*-

from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdkecs.request.v20140526 import DescribeInstancesRequest
from aliyunsdkecs.request.v20140526 import StopInstanceRequest

# Initialize AcsClient instance
client = AcsClient(
  "<your-access-key-id>",
  "<your-access-key-secret>",
  "<your-region-id>"
);

# Initialize a request and set parameters
request = DescribeInstancesRequest.DescribeInstancesRequest()
request.set_PageSize(10)

# Print response
response = client.do_action_with_exception(request)
print response

HTTP DEBUG

To use the function HTTP DEBUG, you must set DEBUG in your environment variable, the corresponding value may be sdk or SDK.

The following example shows what the HTTP DEBUG do, which will help you debug your codes.

> GET /databases?RegionId=cn-hangzhou HTTP/1.1
> Host : ads.cn-hangzhou.aliyuncs.com
> User-Agent : AlibabaCloud (Windows 10;AMD64) Python/3.7.1 Core/2.13.1 python-requests/2.18.1
> accept-encoding : *
> Accept : application/json
> Connection : keep-alive
> x-sdk-invoke-type : normal
> x-acs-version : 2019-01-22
> x-acs-region-id : cn-hangzhou
> Date : Thu, 21 Feb 2019 08:00:50 GMT
> x-acs-signature-method : HMAC-SHA1
> x-acs-signature-version : 1.0
> Authorization : acs ...
> x-sdk-client : python/2.0.0

< HTTP/1.1 503 SERVICE_UNAVAILABLE
< Date : Thu, 21 Feb 2019 08:00:50 GMT
< Content-Type : application/json; charset=UTF-8
< Content-Length : 297
< Connection : keep-alive
< Access-Control-Allow-Origin : *
< Access-Control-Allow-Methods : POST, GET, OPTIONS
< Access-Control-Allow-Headers : X-Requested-With, X-Sequence, _aop_secret, _aop_signature
< Access-Control-Max-Age : 172800
< x-acs-request-id : 670F3D09-F8E7-4144-83C3-B56C35DA35ED
< Server : Jetty(7.2.2.v20101205)

Download details:

Author: aliyun
Source code: https://github.com/aliyun/aliyun-openapi-python-sdk
License: View license

#python #openapi

What is GEEK

Buddha Community

Alibaba Cloud Software Development Kit for Python
Christa  Stehr

Christa Stehr

1594456938

Offshore Software Development - Best Practices

With the rise of globalization and the worldwide lockdown due to the pandemic, most of the work has been done by remote working processes and professionals from their homes. This lockdown has proved the efficiency of remote development and enhanced the trust in offshore software development industry.

To make the most out of the benefits of offshore software development, you should understand the crucial factors that affect offshore development. This is why you should read this guide for the best practices when hiring an offshore software development company. Despite the size and the industry of the business, offshore software development is not beneficial for every entrepreneur in many aspects to make the optimum use of talents in technology across the globe.

Here are some of the top reasons why offshore development is beneficial for your business.

  • Offshore development teams can work on flexible timing to provide you with the best possible software development practices.
  • Get access to the talents across the world from your home to develop the top of the line software with the help of offshore development companies.
  • Assured high quality and next-generation technology expertise with duly NDA signed with respect to the priorities of the business.
  • With flexible recruitment models, you can hire the freelance developers, remote development team, or an entire offshore development company with respect to the size of your business.
  • Build high-end software applications from one corner of the world by hiring software developers across the world.
  • Get immediate access to the best resources without hiring them on a permanent basis.

To avail of all these benefits, you should have clear goals, a list of requirements, and features that are mandatory for your software product.

Here are a few tips to help you find the best offshore software development company. Build a top-notch software application by following the listed best practices.

#web development #how to start offshore software development company #offshore meaning #offshore software development best practices #offshore software development company #offshore software development company in india #offshore software development cost #offshore software development statistics #outsource software development

Hire Python Developers

Are you looking for experienced, reliable, and qualified Python developers?

If yes, you have reached the right place.

At HourlyDeveloper.io, our full-stack Python development services deploy cutting edge technologies and offer outstanding solutions to make most of the major web and mobile technologies.

Hire Python developers, who have deep knowledge of utilizing the full potential of this open-source programming language. Scalability is the biggest advantage of Python, which is why it is loved by developers.

Consult with experts:- https://bit.ly/2DSb007

#hire python developers #python developers #python development company #python development services #python development #python developer

Best Python Development Company in USA | Python Development Services

A versatile programming language that is known for its ease of use, simplicity, and quality in development is Python. It can also be used by developers to automate repetitive tasks which reduce the development time of the project.

Want to develop a website or mobile app in Python?

WebClues Infotech is an award-winning python development agency that specializes in Website and Mobile App Development for various industries. With a skilled & expert team of 150+ members who have served around 600+ clients, WebClues Infotech is the right agency to help you out in your development needs.

Want to know more about the work we have done in Python Development

Visit: https://www.webcluesinfotech.com/python-development/

Share your requirements https://www.webcluesinfotech.com/contact-us/

View Portfolio https://www.webcluesinfotech.com/portfolio/

#best python development company in usa #python development services #python development agency #python web development company #python development services company #hire python developer

Hire Expert Python Developers | Hire Top Python Developers

Python is one of the 10 most popular programming languages of all time, The reason? It offers the flexibility and eases no other programming language offers.

Want to develop a GUI for a website, or mobile App?

If your answer is yes and I can guarantee in most cases it will then hire dedicated Python developers who have the experience and expertise related to your project requirements from WebClues Infotech.

You might be wondering how?

WebClues has a large pool of dedicated python developers who are highly skilled in what they do. Also, WebClues offers that developers for hiring at the very reasonable and flexible pricing structure.
Hire a Dedicated Python developer based on what you need.

Share your requirements here https://www.webcluesinfotech.com/contact-us/

Book Free Interview with Python developer: https://bit.ly/3dDShFg

#hire python developers #hire python developers #hire dedicated python developers india #python developers india #hire dedicated python developers programmers #python developers in usa for hire

Hire Python Developers India

Looking to build robust, scalable, and dynamic responsive websites and applications in Python?

At HourlyDeveloper.io, we constantly endeavor to give you exactly what you need. If you need to hire Python developers, you’ve come to the right place. Our programmers are scholars at this language and the various uses it can be put to.

When you Hire Python Developers India you aren’t just getting teams that are whizzes in this field. You are also getting people who ensure that they are au courant with the latest developments in the field and can use this knowledge to offer ingenious solutions to all your Python-based needs.

Consult with our experts: https://bit.ly/3hNzzu2

#hire python developers india #hire python developers #python developers #python development company #python development services #python development