Altibase for SQLAlchemy
Project description
sqlalchemy-altibase7
- Altibase support for SQLAlchemy implemented as an external dialect.
- It is tested on Altibase v7.
- This source code is based on https://pypi.org/project/sqlalchemy-altibase .
- This package itself is uploaded on https://pypi.org/project/sqlalchemy-altibase7 .
Changes from sqlalchemy-altibase
- It is mainly supplemented for langchain connectivity.
- sqlalchemy version upper limit requirement is removed.
Prereqisite
- unixodbc
- pyodbc
unixodbc
- install : sudo apt-get install unixodbc-dev
- example configuration :
$ cat /etc/odbc.ini
[PYODBC]
Driver = /home/hess/work/altidev4/altibase_home/lib/libaltibase_odbc-64bit-ul64.so
Database = mydb
ServerType = Altibase
Server = 127.0.0.1
Port = 21121
UserName = SYS
Password = MANAGER
FetchBuffersize = 64
ReadOnly = no
$ cat /etc/odbcinst.ini
[ODBC]
Trace=Yes
TraceFile=/tmp/odbc_trace.log
pyodbc
- install : pip install pyodbc
- test :
$ python
>>> import pyodbc
>>> conn = pyodbc.connect('DSN=PYODBC')
>>> curs = conn.cursor()
>>> curs.execute("select * from v$table")
>>> curs.fetchall()
sqlalchemy-altibase7 using langchain
- install : pip install sqlalchemy-altibase7
- reference : https://python.langchain.com/v0.1/docs/use_cases/sql/
- test preparation : Populate sample data into Altibase database using "test/Chinook_Altibase.sql" file in this repository.
- test programs
- langchain_chain.py : using chain
- langchain_agent.py : using sql agent
- langchain_agent_fewshot.py : using sql agent with few shot prompt
- langchain_agent_retriever.py : using sql agent with retriever for correcting invalid nouns
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sqlalchemy_altibase7-0.0.4.tar.gz.
File metadata
- Download URL: sqlalchemy_altibase7-0.0.4.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a3a3ff0a4accdea4482522ff9b10722a4310e149254f6235dbbd8325ec78cf66
|
|
| MD5 |
32f4a86c1e83518fa374ab30475d04ad
|
|
| BLAKE2b-256 |
e18e54dcdb620e8b2c7f7de03ea0bcc51d438c597cb1ee9b2252b7479e1e7418
|
File details
Details for the file sqlalchemy_altibase7-0.0.4-py3-none-any.whl.
File metadata
- Download URL: sqlalchemy_altibase7-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cefb15828349c1acab1b209c400c411b23cadd9ad98cbc3982e11da9f2c8fcca
|
|
| MD5 |
d53e138b9472f7557567e82230f2544a
|
|
| BLAKE2b-256 |
c2f5213d7358d3e157c7719fdda680482fc9304f1823954f96872d35775ad57b
|