Aurelie  Block

Aurelie Block

1596435540

Testing a Python-based API call with a data science charm

A short glance at software testing

As computer applications tend to be delegated even more human decisions, the software engineering industry has acknowledged testing as an essential part of the development process.

Approaches to software testing vary. Applications are tested as a whole, or as integrated systems, or even unit by unit. We have test engineers, test managers, and testers. There are platforms that offer outsourcing manual testing, and there are automated tests: literally, applications operating other applications and often even imitate a living user.

Why test an API?

The case study is about testing the API calls performance. Python asyncio and concurrent.futures packages are used to run multiple API calls. They divide the loop runs into pools and go through several pools in a parallel manner, thus, performing more than one call simultaneously. This reduces the total execution time.

The question of an optimal number of threads arose in the following regard. Let’s imagine there is a mobile app that accesses an open-source database that provides an API. I needed to write an API call that successfully retrieves the data and integrate it into the app. This integration ought to include a first processing of the received data.

As I will show in the next section, during the initial approach to the data, I met a few problems. The data could only be downloaded in small pieces, thus, forcing me to make multiple requests. This could slow down the app performance and spoil the user experience.

The fact made me look closer at the API call itself, despite, originally, my major task was to build a data pipeline inside the app.

I, therefore, started to experiment with the API call.

The experiment aimed to find out an optimal number of threads, or the maximum number of parallel calls. This number has its limits that depend on different factors.

After I had gone through some painful mistakes, I managed to stick to an ad hoc systematic approach that I am going to disclose. The article shows the steps towards a complete testing code, which is attached at the end of it.

#automated-testing #software-testing #data-science #python #api-testing

What is GEEK

Buddha Community

Testing a Python-based API call with a data science charm
akshay L

akshay L

1610872689

Data Science With Python Training | Python Data Science Course | Intellipaat

In this Data Science With Python Training video, you will learn everything about data science and python from basic to advance level. This python data science course video will help you learn various python concepts, AI, and lots of projects, hands-on demo, and lastly top trending data science and python interview questions. This is a must-watch video for everyone who wishes o learn data science and python to make a career in it.

#data science with python #python data science course #python data science #data science with python

Uriah  Dietrich

Uriah Dietrich

1618449987

How To Build A Data Science Career In 2021

For this week’s data science career interview, we got in touch with Dr Suman Sanyal, Associate Professor of Computer Science and Engineering at NIIT University. In this interview, Dr Sanyal shares his insights on how universities can contribute to this highly promising sector and what aspirants can do to build a successful data science career.

With industry-linkage, technology and research-driven seamless education, NIIT University has been recognised for addressing the growing demand for data science experts worldwide with its industry-ready courses. The university has recently introduced B.Tech in Data Science course, which aims to deploy data sets models to solve real-world problems. The programme provides industry-academic synergy for the students to establish careers in data science, artificial intelligence and machine learning.

“Students with skills that are aligned to new-age technology will be of huge value. The industry today wants young, ambitious students who have the know-how on how to get things done,” Sanyal said.

#careers # #data science aspirant #data science career #data science career intervie #data science education #data science education marke #data science jobs #niit university data science

Aurelie  Block

Aurelie Block

1596435540

Testing a Python-based API call with a data science charm

A short glance at software testing

As computer applications tend to be delegated even more human decisions, the software engineering industry has acknowledged testing as an essential part of the development process.

Approaches to software testing vary. Applications are tested as a whole, or as integrated systems, or even unit by unit. We have test engineers, test managers, and testers. There are platforms that offer outsourcing manual testing, and there are automated tests: literally, applications operating other applications and often even imitate a living user.

Why test an API?

The case study is about testing the API calls performance. Python asyncio and concurrent.futures packages are used to run multiple API calls. They divide the loop runs into pools and go through several pools in a parallel manner, thus, performing more than one call simultaneously. This reduces the total execution time.

The question of an optimal number of threads arose in the following regard. Let’s imagine there is a mobile app that accesses an open-source database that provides an API. I needed to write an API call that successfully retrieves the data and integrate it into the app. This integration ought to include a first processing of the received data.

As I will show in the next section, during the initial approach to the data, I met a few problems. The data could only be downloaded in small pieces, thus, forcing me to make multiple requests. This could slow down the app performance and spoil the user experience.

The fact made me look closer at the API call itself, despite, originally, my major task was to build a data pipeline inside the app.

I, therefore, started to experiment with the API call.

The experiment aimed to find out an optimal number of threads, or the maximum number of parallel calls. This number has its limits that depend on different factors.

After I had gone through some painful mistakes, I managed to stick to an ad hoc systematic approach that I am going to disclose. The article shows the steps towards a complete testing code, which is attached at the end of it.

#automated-testing #software-testing #data-science #python #api-testing

Ray  Patel

Ray Patel

1619518440

top 30 Python Tips and Tricks for Beginners

Welcome to my Blog , In this article, you are going to learn the top 10 python tips and tricks.

1) swap two numbers.

2) Reversing a string in Python.

3) Create a single string from all the elements in list.

4) Chaining Of Comparison Operators.

5) Print The File Path Of Imported Modules.

6) Return Multiple Values From Functions.

7) Find The Most Frequent Value In A List.

8) Check The Memory Usage Of An Object.

#python #python hacks tricks #python learning tips #python programming tricks #python tips #python tips and tricks #python tips and tricks advanced #python tips and tricks for beginners #python tips tricks and techniques #python tutorial #tips and tricks in python #tips to learn python #top 30 python tips and tricks for beginners

Data Science with Python Certification Training in Chennai

Learn Best data science with python Course in Chennai by Industry Experts & Rated as and Best data science with python training in Chennai. Call Us Today!

#data science with python training #data science with python courses #data science with python #data science with python course