Skip to main content

Mixnode Python SDK

Project description


The Mixnode Python SDK allows you to easily integrate the Mixnode REST APIs into your Python application.


  • Python2 and above.

  • A Mixnode API key from a registered user on the Mixnode portal.


pip install mixnode-py-sdk


Follow this tutorial to see a step-by-step guide and examples of how to use the Mixnode Python SDK.

Get the API key from Mixnode portal

  • Create an account on Mixnode.

  • If already registered, then login and navigate to api key page.

  • Dashboard -> Choose API from left menu -> Note the API key.

  • Or, directly navigate to to find your API key.


This SDK comes with Basic Authentication over HTTPS which requires you to pass your Mixnode API key using a config file or as a string during client instantiation.

Basic Authentication

This type of token is given directly to the application.

from mixnode import Mixnode

# Create an instance of the Mixnode Client
client = Mixnode("Your API Key") #add your API KEY here; available at

Note that api_key can also be passed as a JSON object in a config file to avoid specifying the key in the code. Please see Examples

Quick Start

from mixnode import Mixnode, MixnodeError
    query = "SELECT url, title from homepages LIMIT 10"
    response = Mixnode("Your API Key").execute(query)
except MixnodeError as error:

Mixnode’s execute functionality

execute is a synchronous operation which builds response based on paging Mixnode SQL API.

execute can accept upto two parameters : query, inputLimit (optional).

Please see various Examples for usage details.

from mixnode import Mixnode, MixnodeError
 response = Mixnode("Your API Key").execute(query)
 # Do something with response
except MixnodeError as error:
 # Do something with error
from mixnode import Mixnode, MixnodeError
 # Fires a query and also sets the input limit on the data to be scanned
 response = Mixnode("Your API Key").execute(query, inputLimit)
 # Do something with response
except MixnodeError as error:
 # Do something with error

SDK debugging

Turning on the debug mode logs the HTTP requests being sent to the Mixnode API. This is useful to verify if the queries being sent are correct or to verify if query execution is in progress.

# Setting debug to true logs the state of the application.
# Do not use this in production.
Mixnode("Your API Key").setDebug(True);

Examples: Mixnode Python Client



Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mixnode-py-sdk-1.0.2.tar.gz (184.4 kB view hashes)

Uploaded source

Built Distribution

mixnode_py_sdk-1.0.2-py2.py3-none-any.whl (11.8 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page