Data as API: Building a Type Manager with Python

Vaideeswaran Ganesan (~vaideeswaran)





Ever wonder creating your own super-type-manager leveraging the python's own type constructs?

Ever explored alternatives to APIs for integration?

In this talk, we will cover our experience in building a new type manager (as part of developing open source OpenManage(tm) Software Development Kit) leveraging pythons own type constructs and explore how this new type manager provides a credible alternative to APIs, especially in those information-heavy environments like Device Management.


Devices (like Servers, Switches, Telecom Switches) are data-intensive systems. Their information model is so intensive, that practically all operations (health, inventory, metrics, configuration) on the device ends up in primarily as CRUD operations on the information model they expose. Only a paltry few operations are exposed as APIs.

When building an API for managing these devices, we realized that providing classic function-style APIs only degraded the user experience. What we realized was there was significant information available on the Servers, and providing an API for exposing traditional CRUD (Create, Retrieve, Update and Delete) for all information nuggets was just exploding the API sets. It was not necessarily covering all the scenarios that could be possible for management and did not seem to scale.

Our approach was to take this information model within the devices and expose them as a huge navigable data structure representing the entire spectrum of the device and provide a language native experience. We created a new type manager leveraging the python class special operators (getattr(), setattr(), le() etc.) to create a whole new type manager that provides additional controls and safeguards. Some of the safeguards include:

  1. Not allowing edits to read-only components
  2. Allowing only applicable changes only (ranges, enumerations)
  3. Providing native python experience for special types (IP Address Types etc.)
  4. Providing mechanisms to validate cross-attribute validations
  5. Providing custom indices for arrays (like Virtual Disks, Users)
  6. Providing mechanism for tracking changes to configuration
  7. Apply changes to the device optimally
  8. Provide mechanisms for identifying configuration drifts

Outline :

Outline of the presentation:

  1. Introduction
  2. Device Configuration - Aspects & Peculiarities
  3. Pitfalls of API approach for Device Configuration
  4. Type Manager - introduction
  5. Super Types - Enumerations, Fields, Classes and Arrays
  6. Bringing in Native Type Experience
  7. Data as API - Enriched user experience
  8. Demo
  9. Q&A

Key takeways to audience

Audience will get an exposure:

  1. How to create your own type manager by overloading python type constructs
  2. Exposure to alternative approach to creating APIs for data-heavy systems & explore benefits
  3. Learn how type manager simplifies your life as well as the life of your consumers.
  4. Secrets of the python inbuilt __ operators - and how you can leverage them to provide native type experience even for your own custom classes
  5. How you can create a better user experience for customers in a simple way
  6. How you can incorporate Object Oriented SOLID principles


  1. General familiarity with type concepts (fields, arrays, classes, enums) is needed
  2. Exposure to in-built operators like (getattr etc. will help)
  3. Exposure to Systems Management would be useful.

Content URLs:


Speaker Info:

Vaideeswaran Ganesan, Senior Principal Technologist @ Dell EMC, has special focus in building systems management products for servers, networking and data center products. His passion is compiler design, analytics, systems management, networking protocols and automation.

Ajaya Senapati, Principal Technologist @ Dell EMC, has special focus in building systems management products for servers, networking and storage products.

Speaker Links:

Vaideeswaran Ganesan 1. My Github Repository 2. My Linkedin Article which I wrote while implementing this Fun with Python Code Generation

Ajaya Senapati 1. Link

Id: 788
Section: Core python and Standard library
Type: Talks
Target Audience: Advanced
Last Updated: