APIs and API Design with Python

Similar documents
Python Basics. Lecture and Lab 5 Day Course. Python Basics

Intermediate Python 3.x

Programming in Python

PTN-202: Advanced Python Programming Course Description. Course Outline

Lotus IT Hub. Module-1: Python Foundation (Mandatory)

Flask Web Development Course Catalog

Course Title: Python + Django for Web Application

Programming in Python Advanced

Python Training. Complete Practical & Real-time Trainings. A Unit of SequelGate Innovative Technologies Pvt. Ltd.

Mastering phpmyadmiri 3.4 for

CIS192 Python Programming

Quick housekeeping Last Two Homeworks Extra Credit for demoing project prototypes Reminder about Project Deadlines/specifics Class on April 12th Resul

Flask-Cors Documentation

Webgurukul Programming Language Course

Introduction to Python

Introduction 13. Feedback Downloading the sample files Problem resolution Typographical Conventions Used In This Book...

TH IRD EDITION. Python Cookbook. David Beazley and Brian K. Jones. O'REILLY. Beijing Cambridge Farnham Köln Sebastopol Tokyo

CIS192 Python Programming

Bitnami Re:dash for Huawei Enterprise Cloud

SSH Deploy Key Documentation

Python Certification Training

PYTHON CONTENT NOTE: Almost every task is explained with an example

Junos Platform Automation (JAUT)

Basic Python 3 Programming (Theory & Practical)

Foundations of Python

Connexion Documentation

CS50 Quiz Review. November 13, 2017

flask-jwt-simple Documentation

CS Programming Languages: Python

DATABASE SYSTEMS. Database programming in a web environment. Database System Course,

Discussion CSE 224. Week 4

Management Tools. Management Tools. About the Management GUI. About the CLI. This chapter contains the following sections:

User Guide Parser add-on. Version: September by AgileBio. &

Bitnami OSQA for Huawei Enterprise Cloud

Signals Documentation

About Python. Python Duration. Training Objectives. Training Pre - Requisites & Who Should Learn Python

DevNet Technical Breakout: Introduction to ACI Programming and APIs.

STARCOUNTER. Technical Overview

Unix/Linux Operating System. Introduction to Computational Statistics STAT 598G, Fall 2011

Automated Installation Guide for CentOS (PHP 7.x)

Full Stack Web Developer Nanodegree Syllabus

Compiling Software on UNIX. System Administration Decal Spring 2009 Lecture #4 George Wu Slides prepared by Joshua Kwan

Byte Academy. Python Fullstack

turbo-hipster Documentation

Requests Mock Documentation

Microservices with Node.js

Programming with Python with Software Automation & Data Analytics

Using the vrealize Orchestrator Operations Client. vrealize Orchestrator 7.5

L1/L2 NETWORK PROTOCOL TESTING

Large-Scale Networks

1Z Oracle Linux Fundamentals (Oracle Partner Network) Exam Summary Syllabus Questions

This course is designed for anyone who needs to learn how to write programs in Python.

WhoWhenWhere. Project: WhoWhenWhere Date:

Django with Python Course Catalog

APIs - what are they, really? Web API, Programming libraries, third party APIs etc

OAuth2 Autoconfig. Copyright

StorageGRID Webscale NAS Bridge Management API Guide

Data Science with Python Course Catalog

Automation with Meraki Provisioning API

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016

Virtual Machine. Release 1.0. Howard Chivers

Aim behind client server architecture Characteristics of client and server Types of architectures

Server-side Development using Python and SQL

Network Automation using modern tech. Egor Krivosheev 2degrees

GitHub-Flask Documentation

Linux Essentials. Smith, Roderick W. Table of Contents ISBN-13: Introduction xvii. Chapter 1 Selecting an Operating System 1

Flask Slither Documentation

Automating Administration with Windows PowerShell 2.0

PTN-105 Python programming. Course Outline. Prerequisite: basic Linux/UNIX and programming skills. Delivery Method: Instructor-led training (ILT)

Think Small to Scale Big

Cb Response Interoperability

Distributed Systems. 03r. Python Web Services Programming Tutorial. Paul Krzyzanowski TA: Long Zhao Rutgers University Fall 2017

0. Introduction On-demand. Manual Backups Full Backup Custom Backup Store Your Data Only Exclude Folders.

CS October 2017

Scientific Python. 1 of 10 23/11/ :00

ForgeRock Access Management Customization and APIs

D, E I, J, K, L O, P, Q

Moving data to the cloud using the MoveToCloud script

Tech Note. ConnectWise PSA Integration

CGI Architecture Diagram. Web browser takes response from web server and displays either the received file or error message.

Using Python with ArcGIS

HOW TO FLASK. And a very short intro to web development and databases

ActiveNET. #202, Manjeeraa Plaza, Ameerpet, HYD

Lab 1 Introduction to UNIX and C

Bitnami Dolibarr for Huawei Enterprise Cloud

About the Tutorial. Audience. Prerequisites. Disclaimer & Copyright. TurboGears

PTN-102 Python programming

Network configuration management at CERN

CS197U: A Hands on Introduction to Unix

Open-O Command- Line Interface (CLI)

Duration: Six Weeks Faculty : Mr Sai Kumar, Having 10+ Yrs Experience in IT

ActiveTrust Cloud Threats API

Coding Intro to APIs and REST

Geometric Progression Creative Disruption

Python web frameworks

1. BASICS OF PYTHON. JHU Physics & Astronomy Python Workshop Lecturer: Mubdi Rahman

Release Highlights

Patch Server for Jamf Pro Documentation

Disaster Recovery System

JatinSir - Mastering Python

Transcription:

APIs and API Design with Python Lecture and Lab 5 Day Course Course Overview Application Programming Interfaces (APIs) have become increasingly important as they provide developers with connectivity to everything from rich datasets in an array of formats (such as JSON), to exposing the configurability of software applications and network appliances. Lessons and labs focus on using Python to interact, design, and build APIs for the purposes of scripting automated solutions to complex tasks. Class is mostly live demonstrations and hands on labs. What You ll Learn Develop Python scripts that communicate with RESTful (and non-restful) APIs, as well as design RESTful API interfaces themselves. Use Python to open SSH sessions and pass commands to remote servers, move files via SFTP, parse and manipulate popular data structures (JSON, XML, CSV, and YAML), handle errors, interface with the operating system, create highly efficient regular expressions for parsing, and best practice techniques. 1. Python Review Lists Dictionaries Tuples Conditionals (if, elif, else) Loops (for and when) Functions Variable Scope - Review Converting boiler plate code to functional code Writing Functions (reusable code) Using pip Useful 3rd party modules

Publishing a module Documenting modules 2. OS Interfacing Operating System interfacing with OS module OS module - listdir(), getcwd(), mkdir() Common sys Module Attributes & Methods Working With the os Module & Files/Directories Walking File Trees with os.walk() File, Path and Directory Examples Working with os.path os & os.path Module Examples Environmental Variables Running Shell Commands Compressing and archiving (gzip, tar, zip) 3. Web and RESTful APIs REST REST APIS and HTTP CRUD REST and OpenStack URI analysis and formation Wireshark capturing curl Etcd keystore Creating a Python client to interact with API endpoints API dev keys SSH and Python Secure password retrieval Tokens and APIs 4. Python Protocol Clients Scripting the browser Scripting with HTTP Creating an HTTP Client & Server Python and SSH Building an SFTP Client & Server Python and SFTP limitations Paramiko for SSH Netmiko and Major Network Vendors (Cisco, Juniper, Arista)

5. JSON, YAML, XML, CSV and Excel JSON RFC 7159 JSON Formatting YAML intro YAML lists YAML dictionaries YAML line spanning Reading YAML is easy XML CSV Import json Import yaml Decoding json and yaml to use Using python to decode data structures like YAML, XML, CSV, and JSON Reading from Excel Writing to Excel 6. Generating and Sending Emails Overview of email modules Creating simple emails Interfacing with your email account 7. Dates and Times Python and Cron Import time and time.time() Suspending with sleep() Dealing with time Time formatting Time tuples Creating Calendars 8. Python Regular Expression (Regex) Metacharacter review Re modules search() and match() findall() Compiling regex search patterns Creating highly efficient searches Sorting data sets

Complex sorts sort() vs sorted() Sorting with functions Applying Regex to file searches Applying Regex to API results 9. Code Review Best practice Using pylint Conventions Underscore Double underscore Monkey Patching 10.Web API Design with Flask Flask Overview Decorators Building APIs with Python and Flask APIs returning Jinja2 templating Returning a cookie Building Sessions Redirecting from URIs Build an API to accept a file upload 11.SQLlite Overview Connecting to Python Read / Write operations Other useful instructions Connecting APIs and SQLite Reading and Writing to Databases with APIs 12.Processes and Threads Threading Context change Deadlock errors Thread starvation Racing conditions and racing specifics Working with Locks

Labs Lab 1 - Using vim Lab 2 - Making a Github account Lab 3 - Getting dir(obj) help() and pydoc Lab 4 - Lists Lab 5 - Dictionaries Lab 6 - Python Data to JSON file Lab 7 - Python Data to YAML file Lab 8 - import time Lab 9 - List and Dict Modeling Lab 10 - try and except Lab 11 - Construct a SimpleHTTPServer and HTTP Client Lab 12 - RESTful Open APIs Lab 13 - APIs and JSON Decode Lab 14 - requests library Lab 15 - APIs and Dev Keys Lab 16 - RESTful APIs and Dev Keys Lab 17 - getpass - Secure Password Retrieval Lab 18 - Paramiko SFTP with UN and PW Lab 19 - Paramiko SSH with RSA Lab 20 - Scripting Commands over SSH Lab 21 - Argument Parsing Lab 22 - Making Excel Sheets Lab 23 - Reading Excel Sheets Lab 24 - Timestamping Data Lab 25 - API Tokens and Subjects Lab 26 - RegEx to Check IP Address Lab 27 - Use RegEx to Search Text Lab 28 - Search and Replace Data Lab 29 - Compiling Search Objects Lab 30 - Testing of a Match Exists Lab 31 - Getting sorted() Lab 32 - Sort Stability and Complex Sorts Lab 33 - CSV data Lab 34 - Unpacking Arguments Lab 35 - XML Parsing with ElementTree Lab 36 - Automating SMTP and Extended SMTP (Email) Lab 37 - Archive with zipfile

Lab 38 - Building APIs with Python Lab 39 - Flask APIs and Jinja2 Lab 40 - Flask APIs and Cookies Lab 41 - Flask Sessions Lab 42 - Flask Redirection and Errors Lab 43 - Flask Uploading Files Lab 44 - Connecting an API to a Database Lab 45 - Learning sqlite3 Lab 46 - Tracking API Data with sqlite3 Lab 47 - Tracking Inventory with sqlite Lab 48 - Working with Threads Prerequisites Recommended Prerequisite: Python Basics (5 days) Coding experience in another language serves as an adequate prerequisite Who Should Attend System administrators, network engineers, and developers will find this course compelling as they build and interact APIs that not only return highly parsable datasets, but also trigger scripted actions. Some previous experience with Python is ideal, although, coding experience in another language is also enough to find success within this course. Follow-on Courses Recommended Follow up: Python for Network Automation (5 days)