sqlalchemy-hana
SQLAlchemy dialect for SAP HANA
Decision gist · record as of 2026-08-14
Yes. The package is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is low. It is the standard way to use SAP HANA from SQLAlchemy in Python. Suitable for enterprise applications, data pipelines, and applications requiring HANA-specific features. Verify that hdbcli is available in your environment and that your Python version is 3.10 or later.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10+, SQLAlchemy 2.x, and the hdbcli driver to be installed separately or available in your environment.
- Low friction install with a pure-Python wheel.
- Actively maintained—last release 28 days ago, repository shows recent activity.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most enterprise and open-source projects.
last release 2026-07-17 (28 days) · last repo commit 2026-08-14 · 149 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 690,302 downloads/mo, #5,329 on PyPI
Alternatives
Verify before relying
pip install sqlalchemy-hana
from sqlalchemy import create_engine
engine = create_engine('hana://username:password@example.de:30015')- Whether hdbcli is automatically installed as a dependency or must be managed separately by the user.
- Performance characteristics and query optimization support compared to other HANA connectors.
- Completeness of reflection and introspection features for complex HANA schemas.
What it is and what it does
sqlalchemy-hana is a SQLAlchemy dialect that bridges Python applications to SAP HANA databases. It translates SQLAlchemy's ORM queries and SQL expressions into HANA-compatible SQL, using hdbcli as the underlying connection driver. The dialect handles HANA-specific quirks like case sensitivity rules, LIMIT/OFFSET behavior, and type mappings (e.g., String→NVARCHAR, JSON→NCLOB).
The package supports core HANA features including table type specification (ROW or COLUMN), foreign key constraints, unique constraints, and schema reflection via a custom HANAInspector. It works with SAP HANA Cloud, on-premise HANA, and HANA Express Edition. The dialect is production-stable, actively maintained, and covers modern Python versions (3.10–3.14). Note that RETURNING clauses and ARRAY types are not supported, and some type features like JSON deep indexing are limited by HANA itself.
Use it for
- Build a Python web application using SQLAlchemy ORM against an existing SAP HANA database without writing raw SQL.
- Migrate a SQLAlchemy application from another database to SAP HANA by switching the connection string.
- Reflect an existing HANA schema into SQLAlchemy models for rapid prototyping or data exploration.
- Use HANA-specific table types (ROW or COLUMN) and UUID storage options (VARBINARY or NVARCHAR) via sqlalchemy-hana's extended API.
- Connect to SAP HANA Cloud or Express Edition from a Python data pipeline or ETL workflow.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is production-stable, actively maintained, has no known vulnerabilities, and carries a permissive license. Install friction is low. It is the standard way to use SAP HANA from SQLAlchemy in Python. Suitable for enterprise applications, data pipelines, and applications requiring HANA-specific features. Verify that hdbcli is available in your environment and that your Python version is 3.10 or later.
Install
sqlalchemy-hana on PyPI
Before you install
Low friction install with a pure-Python wheel. Actively maintained—last release 28 days ago, repository shows recent activity. Requires Python 3.10+ and SQLAlchemy 2.x, plus the hdbcli driver which must be separately installed or available.
Requires Python 3.10+, SQLAlchemy 2.x, and the hdbcli driver to be installed separately or available in your environment.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for most enterprise and open-source projects.
Quickstart
pip install sqlalchemy-hana
from sqlalchemy import create_engine
engine = create_engine('hana://username:password@example.de:30015')
Verify before relying
- Whether hdbcli is automatically installed as a dependency or must be managed separately by the user.
- Performance characteristics and query optimization support compared to other HANA connectors.
- Completeness of reflection and introspection features for complex HANA schemas.
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release ~=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagessqlalchemyhdbclityping_extensions |
| Maintenance | Actively maintained 28 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 690,302 / month, #5,329 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: SQLTopic :: DatabaseTopic :: Database :: Front-EndsTopic :: Software DevelopmentTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: sqlalchemy_hana-4.6.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “sqlalchemy sap hana dialect”
- sqlalchemy-hanaProvides a SQLAlchemy dialect that enables you to use SAP HANA as a…
- hdbcliA PEP 249-compliant Python database driver for connecting to and…
- azure-mgmt-hanaonazureProvides a Python client library to manage SAP HANA on Azure…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also hana-ml · hdbcli · duckdb-engine · pyhdb · sqlalchemy-solr · databricks-sqlalchemy · sqlalchemy-databricks · iomete-sqlalchemy · pinotdb · pybigquery