I have published mobile apps for the play store and the app store. But formatting the screenshots for the stores is a long and boring task. You need to crop your screenshots, add a background and some text to highlight your keys feature. You have to repeat it for each different screen size. And do it again for all languages supported by your app.

So as a lazy developer I made a python script to automate these tasks and generate images ready to upload on the store.

The only package you will need to follow this article is Pillow or…

Handle Excel files with python and pandas

Pandas is an awesome tool when it comes to manipulates data with python. Pandas also have really cool function to handle Excels files. Thought this article I will explain how to read and writes files, highlight cells and how to add charts.

Installs and imports

Install these packages with pip

pip install pandas
pip install XlsxWriter

And now import

import pandas as pd

Read an Excel File

Reading an excel file and importing it in a pandas dataframe is as simple as :

df = pd.read_excel("file_name")

A Dataframe is a 2-dimensional labeled data structure, it the main data structure used in pandas.

read_excel as a lot of…

Photo by Aviv Perets on pexels

Validation in the API world means checking if the data send is good or not. You never can entirely rely on having only a client-side validation. Because you don’t know what’s happening on the client, you can’t trust the data you receive. Even if you have a private API, someone could still send you invalid requests.

Server-side validation implied checking multiple things :

  • what are the expected properties
  • does they have the good format/type
  • is the property required

Json schema

The JSON Schema is a way to describe any instance of JSON data, like the ones found in our HTTP request or…

The json package can encode python objects as strings with the json.JSONEncoder class, and decodes strings into python objects using the json.JSONDecoder class.

Here is an example :

import json

# Convert a dict to a string
json.dumps({"name": "Paul", "age": 24})

# Convert a string to a dict
json.loads('{"name": "Paul", "age": 24}')

By default, these class supports dict, list, tuple, str, int, float, bool and None values. But it’s possible to overload JsonEncoder and JsonDecoder to support Datetime, Decimal or any of your classes.

It can be useful when you want to serialize or deserialize objects. I like to use…

This article will show you how to use Deezer’s API with python and Flask. We will create a project, see how to authenticate to the API, use some route to retrieves information and play music with the plugin.

Prerequisite

  • You need a Deezer account
  • Go to https://developers.deezer.com/myapps and create an a new app. You can set http://127.0.0.1:5000/deezer/login in Redirect URL field.
  • You will need your Application ID, Secret Key and the Redirect URL to use the API

Set up project

  1. Create your project
  2. Create your virtual env
  3. Install packages
pip install Flask
pip install request

4. Add an app.py file. Add the code below…

Alexis Gomes

I work at yper. I’m a python developper, learning data-science. I’ve made a www.blindfoldchesstactic.com app. You can buy me coffee : www.buymeacoffee.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store