Installation

Needle.sh SDK installation just takes a few minutes. Since the SDK is embedded into your web applications, the process is different based on your backend language and framework.

The SDK should be started as early in your web application execution as possible. This would be different for different web applications, but the following general guidelines can help.

Language Framework Guidelines
Python Django Start the SDK in wsgi.py file (located in the same directory as settings.py)
Python Flask Start the SDK after you create the Flask app, and pass the Flask app instance to the SDK
Node.js Express Start the SDK at the beginning of your project's app.js file

Python

Needle.sh SDK supports the following Python web frameworks
• Django
• Flask
Install the Needle.sh SDK from pip using the command below on the terminal.
$ pip install needle-sdk
Start the Needle.sh SDK as given below.
# Start the Needle.sh SDK
import needle_sdk
needle_sdk.start()

Node.js

Needle.sh SDK supports the following Node.js web frameworks
• Express
Install the Needle.sh SDK from npm using the command below on the terminal.
$ npm install needle-sdk
Integrate the Needle.sh SDK into your web app as given below.
// Start the Needle.sh SDK
const needle_sdk = require('needle-sdk');
needle_sdk.start();