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.

Metadata

Release files for stimulsoft-data-adapters 2026.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stimulsoft-data-adapters 2026.4.1
File Size Uploaded Provenance
stimulsoft_data_adapters-2026.4.1.tar.gz 48.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for stimulsoft-data-adapters 2026.4.1
File Interpreter ABI Platform
stimulsoft_data_adapters-2026.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 110.1 kB

Release files / stimulsoft_data_adapters-2026.4.1.tar.gz

Download URL stimulsoft_data_adapters-2026.4.1.tar.gz
Size 48.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a0f55835b7fd7e5fc846a0e2bba4dc0ef3ff0298e0476fe8484b7d168193e19c
BLAKE2b-256 checksum
How to use checksums
c3ce5addaf614606e82951544b4c73a7c2a9e2f7a54135e04a839a35800f4301
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release files / stimulsoft_data_adapters-2026.4.1-py3-none-any.whl

Download URL stimulsoft_data_adapters-2026.4.1-py3-none-any.whl
Size 61.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc7471c8e79cdf0acf20b435c7c1a4b0d7e4ec4f8ee0fedea6f84c6b6fc3161e
BLAKE2b-256 checksum
How to use checksums
cef27c9a6bad0fa33fbfeb5c6dee492e52d558cdb3d13091e7f4d2d155d2d85c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Security for stimulsoft-data-adapters 2026.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

2026.4.1 This release

2 release files No provenance

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