Skip to main content

Stimulsoft data adapters for Python.

Since pure JavaScript does not have built-in methods for working with remote databases, this functionality is implemented using server-side code.

Install Data Adapters

To install the Stimulsoft data adapters for Python, you can use the specified command:

python -m pip install stimulsoft-data-adapters

All supported data adapters will be installed, as well as the universal pyodbc data driver, which supports most databases. If necessary, you can install any additional native data driver from the list below.

To install Stimulsoft data adapters for Python with all the necessary data drivers, you can use the following command:

python -m pip install stimulsoft-data-adapters[ext]

Working with data adapters

To start working with data adapters, it is enough to define the StiBaseHandler class, call processRequest() function which accepts HTTP request data as input, and generates a response that needs to be passed to the report generator.

The StiBaseHandler class supports simplified work with the Flask, Django, and Tornado frameworks. To process the request, it is enough to pass the request object to the handler, and return a response generated specifically for the framework.

Flask

from flask import Flask, request
from stimulsoft_data_adapters import StiBaseHandler

@app.route('/handler', methods = ['GET', 'POST'])
def handler():
    handler = StiBaseHandler()
    handler.processRequest(request)
    return handler.getFrameworkResponse()

Django

from django.http import HttpRequest
from stimulsoft_data_adapters import StiBaseHandler

def handler(request: HttpRequest):
    handler = StiBaseHandler()
    handler.processRequest(request)
    return handler.getFrameworkResponse()

Tornado

from tornado.web import Application, RequestHandler
from stimulsoft_data_adapters import StiBaseHandler

class Handler(RequestHandler):
    def get(self):
        handler = StiBaseHandler()
        handler.processRequest(self.request)
        response = handler.getResponse()
        self.set_header('Content-Type', response.contentType)
        self.write(response.data)

For all other cases, it is enough to pass query vars and the request body to the handler. After that, you can get a response from the handler, which will contain the data and the necessary information.

from stimulsoft_data_adapters import StiBaseHandler

def handler():
    handler = StiBaseHandler()
    handler.processRequest(None, query, body)
    response = handler.getResponse()
    data = response.data
    contentType = response.contentType
    mimetype = response.mimetype

Data adapter events

The handler provides two events: onBeginProcessData and onEndProcessData, which occur before connecting to the database and after receiving data.

from stimulsoft_data_adapters import StiBaseHandler, StiDataEventArgs

@app.route('/handler', methods = ['GET', 'POST'])
def handler():
    handler = StiBaseHandler()
    handler.onBeginProcessData += beginProcessData
    handler.onEndProcessData += endProcessData
    handler.processRequest(request)
    return handler.getFrameworkResponse()

onBeginProcessData

In the event args, you can get and change all connection parameters, such as connection string, SQL query, connection name, connection type, data source name and others.

def beginProcessData(args: StiDataEventArgs):
    args.command
    args.database
    args.connection
    args.connectionString = args.connectionString.replace('Pwd=;', 'Pwd=**********;')
    args.queryString
    args.dataSource

onEndProcessData

The event args, in addition to all connection parameters, will contain the result of the data request. It is a set of three arrays - column names, column types and data rows. All values can be changed in the event.

def endProcessData(args: StiDataEventArgs):
    args.result.columns
    args.result.types
    args.result.rows

Install database drivers

By default, without extras, only the data adapters will be installed. All required database drivers must be installed manually. This may be useful for some cases and certain operating systems, or for installing only the necessary drivers.

MS SQL

To use the MS SQL data adapter, you need to install the specified package:

python -m pip install "pymssql[binary]"

Standard connection strings for MS SQL databases are supported.

You can also use the ODBC driver for MS SQL. For this, you need to install the Microsoft ODBC Driver for SQL Server for your operation system. After this, you need to add the name of the ODBC driver to the connection string, for example:

Driver={ODBC Driver 18 for SQL Server}; Data Source=myServerAddress; 
Initial Catalog=myDataBase; User ID=myUsername; Password=myPassword;

Also, additional connection string parameters are supported:

TrustServerCertificate=Yes;

MySQL

To use the MySQL data adapter, you need to install the specified package:

python -m pip install mysql-connector-python

Standard connection strings for MySQL databases are supported.

You can also use the ODBC driver for MySQL. For this, you need to install the Connector/ODBC for MySQL for your operation system. After this, you need to add the name of the ODBC driver to the connection string, for example:

Driver={MySQL ODBC 8.1 UNICODE Driver}; Server=myServerAddress; 
Database=myDataBase; UserId=myUsername; Pwd=myPassword;

PostgreSQL

To use the PostgreSQL data adapter, you need to install the specified package:

python -m pip install "psycopg[binary]"

Standard connection strings for PostgreSQL databases are supported.

You can also use the ODBC driver for PostgreSQL. For this, you need to install the PostgreSQL ODBC Driver for your operation system. After this, you need to add the name of the ODBC driver to the connection string, for example:

Driver={PostgreSQL Unicode}; Server=myServerAddress; Port=5432; 
Database=myDataBase; User Id=myUsername; Password=myPassword;

Firebird

To use the Firebird data adapter, you need to install the specified package:

python -m pip install firebird-driver

Standard connection strings for Firebird databases are supported.

You can also use the ODBC driver for Firebird. For this, you need to install the Firebird ODBC Driver for your operation system. After this, you need to add the name of the ODBC driver to the connection string, for example:

Driver={Firebird/InterBase(r) driver}; User=SYSDBA; Password=masterkey; 
Database=SampleDatabase.fdb; DataSource=myServerAddress; Port=3050;

Oracle

To use the Oracle data adapter, you need to install the specified package:

python -m pip install oracledb

To run the driver, you will also need to install Oracle Instant Client for your operating system, and if required, add the path to it to the environment variables. Standard connection strings for Oracle databases are supported.

You can also use the ODBC driver for Oracle. For this, you need to install the Oracle Instant Client ODBC for your operation system. After this, you need to add the name of the ODBC driver to the connection string, for example:

Driver={Oracle in instantclient_19_20}; Data Source=TORCL; 
User Id=myUsername; Password=myPassword;

MongoDB

To use the MongoDB data adapter, you need to install the specified package:

python -m pip install "pymongo[srv]"

Standard connection strings for MongoDB databases are supported.

ODBC

To use the ODBC data adapter, you need to install the specified package (if for some reason it was not installed automatically with the data adapter package):

python -m pip install pyodbc

After that, you can create a native ODBC connection in the Report Designer using any supported driver specified on this page.

Useful links

Download files

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

Source Distribution

stimulsoft_data_adapters-2026.3.3.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stimulsoft_data_adapters-2026.3.3-py3-none-any.whl (61.2 kB view details)

Uploaded Python 3

File details

Details for the file stimulsoft_data_adapters-2026.3.3.tar.gz.

File metadata

File hashes

Hashes for stimulsoft_data_adapters-2026.3.3.tar.gz
Algorithm Hash digest
SHA256 7a3613e4eef6329e27d67319ade4b7a7e27b4b7d5666b94f61a2d542a4b8626b
MD5 a23d2ae70c896a89f5cc385a8f5a5204
BLAKE2b-256 94bb0759b36822dbda4247bab6a8d93bad45ddb1fe0b5b5d069ef9bf0823ca2c

See more details on using hashes here.

File details

Details for the file stimulsoft_data_adapters-2026.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for stimulsoft_data_adapters-2026.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1fa2062bbc82b2fb6c72765cdc09f3722cc89378a3fb7e9b84d8f7fb9f1e176a
MD5 47e49975c5ff3845a80d58244dafc936
BLAKE2b-256 4254be61d8d7066fb4611e5849b0b21406e3b02910afeffa1aa5448df5c530e5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2026.3.3 This release

2 files

2026.3.2

2 files

2026.3.1

2 files

2026.2.4

2 files

2026.2.3

2 files

2026.2.2

2 files

2026.2.1

2 files

2026.1.7

2 files

2026.1.6

2 files

2026.1.5

2 files

2026.1.4

2 files

2026.1.3

2 files

2026.1.2

2 files

2026.1.1

2 files

2025.4.3

2 files

2025.4.2

2 files

2025.4.1

2 files

2025.3.5

2 files

2025.3.4

2 files

2025.3.3

2 files

2025.3.2

2 files

2025.3.1

2 files

2025.2.5

2 files

2025.2.4

2 files

2025.2.3

2 files

2025.2.2

2 files

2025.2.1

2 files

2025.1.6

2 files

2025.1.5

2 files

2025.1.4

2 files

2025.1.3

2 files

2025.1.2

2 files

2025.1.1

2 files

2024.4.5

2 files

2024.4.4

2 files

2024.4.3

2 files

2024.4.2

2 files

2024.4.1

2 files

2024.3.6

2 files

2024.3.5

2 files

2024.3.4

2 files

2024.3.3

2 files

2024.3.2

2 files

2024.3.1

2 files

2024.2.6

2 files

2024.2.5

2 files

2024.2.4

2 files

2024.2.3

2 files

2024.2.2

2 files

2024.2.1

2 files

2024.1.1

2 files

2023.4.3

2 files

2023.4.2

2 files

2023.4.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page