All Projects → SAP → Sqlalchemy Hana

SAP / Sqlalchemy Hana

Licence: apache-2.0
SQLAlchemy Dialect for SAP HANA

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Sqlalchemy Hana

Sqlalchemy Media
Another attachment extension for SqlAlchemy to manage assets which are associated with database models but you don't want to store them into the database
Stars: ✭ 69 (-8%)
Mutual labels:  orm, sqlalchemy
Ormar
python async mini orm with fastapi in mind and pydantic validation
Stars: ✭ 155 (+106.67%)
Mutual labels:  orm, sqlalchemy
Tornado Sqlalchemy
SQLAlchemy support for Tornado
Stars: ✭ 112 (+49.33%)
Mutual labels:  orm, sqlalchemy
Sqlalchemy Imageattach
SQLAlchemy extension for attaching images to entities.
Stars: ✭ 107 (+42.67%)
Mutual labels:  orm, sqlalchemy
Architect
A set of tools which enhances ORMs written in Python with more features
Stars: ✭ 320 (+326.67%)
Mutual labels:  orm, sqlalchemy
Sandman2
Automatically generate a RESTful API service for your legacy database. No code required!
Stars: ✭ 1,765 (+2253.33%)
Mutual labels:  orm, sqlalchemy
Sqlservice
The missing SQLAlchemy ORM interface.
Stars: ✭ 159 (+112%)
Mutual labels:  orm, sqlalchemy
Gino
GINO Is Not ORM - a Python asyncio ORM on SQLAlchemy core.
Stars: ✭ 2,299 (+2965.33%)
Mutual labels:  orm, sqlalchemy
Python For Entrepreneurs Course Demos
Contains all the "handout" materials for Talk Python's Python for Entrepreneurs course. This includes notes and the final version of the website code.
Stars: ✭ 247 (+229.33%)
Mutual labels:  orm, sqlalchemy
Awesome Sqlalchemy
A curated list of awesome tools for SQLAlchemy
Stars: ✭ 2,316 (+2988%)
Mutual labels:  orm, sqlalchemy
Qb
The database toolkit for go
Stars: ✭ 524 (+598.67%)
Mutual labels:  orm, sqlalchemy
Sqlalchemy Mixins
Active Record, Django-like queries, nested eager load and beauty __repr__ for SQLAlchemy
Stars: ✭ 441 (+488%)
Mutual labels:  orm, sqlalchemy
Records
SQL for Humans™
Stars: ✭ 6,761 (+8914.67%)
Mutual labels:  orm, sqlalchemy
Flask Whooshee
Customizable Flask - SQLAlchemy - Whoosh integration
Stars: ✭ 66 (-12%)
Mutual labels:  sqlalchemy
Query Validator
Compile time validation for HQL and JPQL queries in Java code
Stars: ✭ 70 (-6.67%)
Mutual labels:  orm
Ouzo
Ouzo Framework - PHP MVC ORM
Stars: ✭ 66 (-12%)
Mutual labels:  orm
Foal
Elegant and all-inclusive Node.Js web framework based on TypeScript. 🚀.
Stars: ✭ 1,176 (+1468%)
Mutual labels:  orm
Cakephp
CakePHP: The Rapid Development Framework for PHP - Official Repository
Stars: ✭ 8,453 (+11170.67%)
Mutual labels:  orm
Examples Orms
Sample uses of CockroachDB with popular ORMs
Stars: ✭ 65 (-13.33%)
Mutual labels:  orm
Redis Orm
write db yaml once, generate go orm code everywhere.
Stars: ✭ 66 (-12%)
Mutual labels:  orm

SQLAlchemy dialect for SAP HANA

This dialect allows you to use the SAP HANA database with SQLAlchemy. It can use the supported SAP HANA Python Driver hdbcli (supported since SAP HANA SPS 2) or the open-source pure Python client PyHDB. Please notice that sqlalchemy-hana isn't an official SAP product and isn't covered by SAP support.

Prerequisites

Python 2.7 or Python 3.X with installed SAP HANA DBAPI implementation.

SAP HANA Python Driver see SAP HANA Client Interface Programming Reference <https://help.sap.com/viewer/0eec0d68141541d1b07893a39944924e/2.0.02/en-US/39eca89d94ca464ca52385ad50fc7dea.html>_ or the install section of PyHDB <https://github.com/SAP/PyHDB>_.

Install

Install from Python Package Index:

.. code-block:: bash

$ pip install sqlalchemy-hana

You can also install the latest version direct from a cloned git repository.

.. code-block:: bash

$ git clone https://github.com/SAP/sqlalchemy-hana.git
$ cd sqlalchemy-hana
$ python setup.py install

Getting started

If you do not have access to a SAP HANA server, you can also use the SAP HANA Express edition <https://www.sap.com/cmp/td/sap-hana-express-edition.html>_.

After installation of sqlalchemy-hana, you can create a engine which connects to a SAP HANA instance. This engine works like all other engines of SQLAlchemy.

.. code-block:: python

from sqlalchemy import create_engine
engine = create_engine('hana://username:[email protected]:30015')

Alternatively, you can use HDB User Store to avoid entering connection-related information manually each time you want to establish a connection to an SAP HANA database:

.. code-block:: python

from sqlalchemy import create_engine
engine = create_engine('hana://userkey=my_user_store_key')

You can create your user key in the user store using the following command:

.. code-block::

hdbuserstore SET <KEY> <host:port> <USERNAME> <PASSWORD>

By default the hana:// schema will use hdbcli (from the SAP HANA Client) as underlying database driver. To use PyHDB as driver use hana+pyhdb:// as schema in your DBURI.

In case of a tenant database, you may use:

.. code-block:: python

from sqlalchemy import create_engine
engine = engine = create_engine('hana://user:[email protected]/tenant_db_name')

Contribute

If you found bugs or have other issues, you are welcome to create a GitHub Issue. If you have questions about usage or something similar please create a Stack Overflow <http://stackoverflow.com/>_ Question with tag sqlalchemy <http://stackoverflow.com/questions/tagged/sqlalchemy>_ and hana <http://stackoverflow.com/questions/tagged/hana>_.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].