Introduction to Ebay API with python: The Trading API - Part 3

Introduction to Ebay API with Python: The Trading API – Part 3

This is the third article of the series dedicated to Ebay APIs and their use via python. In the first article we saw how to setup our working environment, creating a developer and a sandbox “test” account, generating our API keys and installing the python SDK.

In the second article we approached the Finding API, focusing on the findItemsByKeywords call. In this article we will introduce the Trading API.

In this tutorial you will learn:

  • What are some of the most useful “Trading API” calls
  • How to create an item by using the AddItem API call

Read more

Introduction to Ebay API with python: The Merchandising API - Part 4

Introduction to Ebay API with Python: The Merchandising API – Part 4

The Ebay Merchandising API is the focus of this fourth and last article of the series dedicated to python and Ebay APIs.

This API provides less calls than the ones we previously saw, but among them, one that can be very useful: getMostWatchedItems: we will focus on it.

In this tutorial you will learn:

  • What are the calls provided by the Merchandising API
  • How to use the getMostWatchedItems call

Read more

jq-logo

How to parse a json file from Linux command line using jq

The JSON (JavaScript Object Notation) format is widely used to represent data structures, and is frequently used to exchange data between different layers of an application, or by the use of API calls. We probably know how to interact with json-formatted data with the most used programming languages such as parsing JSON with python, but what if we need to interact with it from the command line, or in a bash script? In this article we will see how we can accomplish such a task by using the jq utility and we will learn its basic usage.

In this tutorial you will learn:

  • How to install jq in the most used Linux distributions or compile it from source
  • How to use jq to parse json-formatted data
  • How to combine filters using “,” and “|”
  • How to use the length, keys, has and map functions

Read more

Children multiplication tables practice test with Bash script on Linux

Introduction

The following post is a little bit different from my other posts as it does not solve any of your Linux configuration problems. Apologies there! This post is an attempt to kill multiple birds with one stone, hence expose children to a command line, avoid web flash and ads driven multiplication practice tests online and most importantly gain some multiplication skills along the way.

My daughter reached the age where she is required to perform multiplication calculation at school. So together we have developed a below Bash script to take her 1×1 to 10×10 multiplication tables practice to the next level. She approved all the output colours with a “cool” mark, and to my surprise, she was very quickly able to correct my forgotten closing quotation marks during the development thus significantly improving development efficiency:-)

Read more

How to create a selection menu using the select statement in Bash shell

How to create a selection menu using the select statement in Bash shell

We all very often use bash scripts to automatize boring and repetitive tasks. Sometimes in our scripts we need to ask
the user to perform one or more choices interactively: in this tutorial we will see how to use the Bash shell select statement to perform such operation in very few lines of code.

In this tutorial you will learn:

  • How to use the Bash select statement
  • How to customize the select menu prompt

Read more

PostgreSQL performance tuning for faster query execution

Objective

Our objective is to make a dummy query execution run faster on PostgreSQL database using only the built in tools available
in the database.

Operating System and Software Versions

  • Operating System: Red Hat Enterprise Linux 7.5
  • Software: PostgreSQL server 9.2

Requirements

PostgreSQL server base install up and running. Access to the command line tool psql and ownership of the example database.

Read more

python-logo-requests-standard-library

How to perform HTTP requests with python – Part 1: The standard Library

HTTP is the protocol used by the World Wide Web, that’s why being able to interact with it programmatically is essential: scraping a web page, communicating with a service APIs, or even simply downloading a file, are all tasks based on this interaction. Python makes such operations very easy: some useful functions are already provided in the standard library, and for more complex tasks it’s possible (and even recommended) to use the external requests module. In this first article of the series we will focus on the built-in modules. We will use python3 and mostly work inside the python interactive shell: the needed libraries will be imported only once to avoid repetitions.

In this tutorial you will learn:

  • How to perform HTTP requests with python3 and the urllib.request library
  • How to work with server responses
  • How to download a file using the urlopen or the urlretrieve functions

Read more

radiolist-widget

How to use ncurses widgets in shell scripts on Linux

In this tutorial we will learn the basics of the dialog utility, in order to use ncurses widget in our shell scripts. We will see how to install dialog in the most used Linux distributions, some of the common options we can use to alter the behavior of dialog, how to use some widgets; among the others: inputbox, checklist, radiolist and yesno. Finally, we will see how to use the data obtained by the widget processing.

In this tutorial you will learn:

  • How to install the dialog utility on Linux
  • What are the most relevant dialog options
  • How to use the inputbox, checklist, radiolist, passwordbox, msbox, calendar and yesno widgets
  • How to manage data derived from the widget processing

Read more