Call : (+91) 968636 4243
Mail : info@EncartaLabs.com
EncartaLabs

Python - API Design

( Duration: 5 Days )

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 configuration of software applications and network appliances. This API Design with Python training course focuses on using Python to interact, design, and build APIs for automated scripting solutions for complex tasks.

By attending API Design with Python workshop, delegates will learn to:

  • Develop Python scripts to communicate with RESTful (and non-RESTful) APIs
  • Design RESTful API interfaces
  • Use Python to open SSH sessions and pass commands
  • Move files via SFTP
  • Parse and manipulate popular data structures (JSON, XML, CSV, and YAML)
  • Manage errors
  • Interface with the operating system
  • Create expressions for parsing

  • Familiarity with any programming or scripting language

The API Design with Python class is ideal for:

  • System Administrators, Network Engineers, and Developers

COURSE AGENDA

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 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

Encarta Labs Advantage

  • One Stop Corporate Training Solution Providers for over 6,000 various courses on a variety of subjects
  • All courses are delivered by Industry Veterans
  • Get jumpstarted from newbie to production ready in a matter of few days
  • Trained more than 50,000 Corporate executives across the Globe
  • All our trainings are conducted in workshop mode with more focus on hands-on sessions

View our other course offerings by visiting https://www.encartalabs.com/course-catalogue-all.php

Contact us for delivering this course as a public/open-house workshop/online training for a group of 10+ candidates.

Top
Notice
X