Skip to Content
Google Cloud Platform Cookbook
book

Google Cloud Platform Cookbook

by Legorie Rajan PS
April 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
6h 18m
English
Packt Publishing
Content preview from Google Cloud Platform Cookbook

How to do it...

In this recipe, we take an input data.csv which has some sensitive data. A Python program parses the file and generates a request JSON file for the API. The second part of the same Python program validates the response and gives a custom output to the user:

  1. Navigate to the Chapter04/using_dlp_api folder.
  2. The Python program check-with-dlp.py reads the data from the data.csv file and generates a request. The request is sent to the DLP API and the response is parsed to find if there is sensitive information in the data sent. The first part of the code is the initial setup for the program:
# -*- coding: utf-8 -*-"""@author: Legorie# The code identifies sensitive information and logs it on the console"""import jsonimport requests ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Google Compute Engine

Google Compute Engine

Marc Cohen, Kathryn Hurley, Paul Newson
Mastering Google App Engine

Mastering Google App Engine

Mohsin Shafique Hijazee
Google Cloud Platform Administration

Google Cloud Platform Administration

Ranjit Singh Thakurratan
Google Cloud Cookbook

Google Cloud Cookbook

Rui Santos Costa, Drew Hodun

Publisher Resources

ISBN: 9781788291996Supplemental Content