Giter VIP home page Giter VIP logo

sqlalchemy-hana's Introduction

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 or the install section of PyHDB.

Install

Install from Python Package Index:

$ pip install sqlalchemy-hana

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

$ 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.

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.

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

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:

from sqlalchemy import create_engine
engine = engine = create_engine('hana://user:pass@host/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 Question with tag sqlalchemy and hana.

sqlalchemy-hana's People

Contributors

jarus avatar sachdevas avatar bsrdjan avatar rakai93 avatar monnemer avatar i063960 avatar ralhei avatar

Stargazers

Roman avatar

Watchers

Zhong Guangqing avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.