The Enigma SDK helps developers build Python applications that integrate with Enigma Public. The SDK is available as a Python package you can install using pip install enigma-sdk (see Setting up your machine).

Why use the SDK?

The Python SDK simplifies app development in several important ways versus using the Enigma Public API directly via calls to HTTP endpoints:

  • The SDK handles all HTTP requests for you. This includes automatic retries, connection pooling, and passing of API keys.
  • It generates iterators automatically if pagination is required, and supports Python list slicing for easy access to resources.
  • It provides a set of “convenience” methods to implement common tasks that would otherwise require multiple API calls.
  • It returns responses as Python objects you can query using familiar object.attribute patterns, rather than navigating JSON hierarchies.

For examples of these and other SDK features, see Getting started with the SDK.

What’s in the SDK reference

Information about all of the available classes and along with their attributes and methods is available from the page menu on the left:

  • You’ll need to create a Public SDK client object to get started. You can then use the client object’s methods to access collections, datasets, snapshots, etc. on Enigma Public. Expand “Public class” in the page menu to view the available methods. If you’ve used the Enigma Public API before, you’ll find there’s a 1:1 mapping between Public methods and API endpoints.
  • The other classes (Collection class, Dataset class, etc.) provide additional attributes and “convenience” methods that are usually easier to use once you get back a collection, dataset, snapshot, etc. from the SDK client. Additionally, there’s a TableView class that simplifies access to snapshot row data. Expand a class in the page menu to view the available attributes and methods for that class.

Getting started with the SDK uses a mix of SDK client methods and convenience methods.