--- id: sqlalchemy-hana version: "4.6.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # sqlalchemy-hana — SQLAlchemy dialect for SAP HANA License: permissive · Maintenance: active · Downloads: 690.3K/mo ## 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 above — verify before relying. Provides a SQLAlchemy dialect that enables you to use SAP HANA as a database backend, translating SQLAlchemy ORM and SQL expressions into HANA-compatible SQL via the hdbcli driver. 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 pip install sqlalchemy-hana uv add sqlalchemy-hana poetry add sqlalchemy-hana ## Installing sqlalchemy-hana 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. 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') Requires Python 3.10+, SQLAlchemy 2.x, and the hdbcli driver to be installed separately or available in your environment. 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_current - Install friction: low - Maintenance: active - Downloads: 690.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlalchemy sap hana dialect, hana database driver python, sqlalchemy hana connector, sap hana orm support, hdbcli sqlalchemy integration, hana database adapter, python sap hana sql, sap-hana, database-driver, orm-dialect [View on SkillFed](https://skillfed.io/packages/sqlalchemy-hana) · [View on PyPI](https://pypi.org/project/sqlalchemy-hana/)