Python interface to CUBRID
Project description
cubrid_db
Overview
cubrid_db is a Python package that implements Python Database API 2.0, for the CUBRID DBMS.
In addition to the minimal feature set of the standard Python DB API, cubrid_db API also exposes nearly the entire native client API of the database engine in the _cubrid package.
Project URL
- Project Home: https://github.com/zimbrul-co/cubrid_db
Dependencies
- CUBRID >=10.1 (prepared for 11.2 by default)
- OS
- Linux (64bit)
- Other Unix and Unix-like os
- Windows (x86 and x86_64) (not tested yet)
- Python: Python >=3.9
- Compiler:
- GNU Developer Toolset 6 or higher
- CMake
- Bash
- Visual Studio 2015 (for Windows)
Build instructions
Clone the repository:
$ git clone --recursive git@github.com:zimbrul-co/cubrid_db.git
Enter the package root directory:
$ cd cubrid_db
If your CUBRID version is different from 11.2, enter the cci-src directory and change the CCI version to match your CUBRID version:
$ cd cci-src
$ git tag -l
v10.1
v10.2
v10.2.1
v10.2.3
v11.0
v11.0.1
v11.1.0.0013
v11.2.0.0029
$ git checkout v11.2.0.0029 # replace this with the required version
$ cd ..
Note: As of 23 February 2024, CUBRID 11.3 is not present in cci-src tags.
Build:
$ python setup.py build
Note: CCI is built first, from cci-src. Note: Older CCI versions use automake/autoconf, newer version use CMake.
Install:
$ sudo python setup.py install # (Windows: python setup.py install)
Sample usage
Prepare virtual environment:
$ python -m venv venv
$ source venv/bin/activate
(venv) $ pip install -e .
Start demodb from the CUBRID distribution:
$ cubrid service start
$ cubrid server start demodb
Sample Python script:
import cubrid_db
con = cubrid_db.connect(
dsn = 'CUBRID:localhost:33000:demodb:::',
user = 'public',
)
cur = con.cursor()
cur.execute('CREATE TABLE test_cubrid (id NUMERIC AUTO_INCREMENT, name STRING)')
cur.execute("insert into test_cubrid (name) values (?)", ['Tom',])
cur.execute('select * from test_cubrid')
cur.fetchall()
cur.close()
con.close()
Testing
Make sure you are in the virtual environment. Install the testing requirements and run pytest.
(venv) $ pip install -r tests/requirements.txt
(venv) $ pytest
Django CUBRID backend - django_cubrid
- django_cubrid is the Django backend for CUBRID Database.
- Moved to https://github.com/zimbrul-co/django_cubrid
Documents
- See Python DB API 2.0 Spec (http://www.python.org/dev/peps/pep-0249/)
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 Distributions
Built Distributions
Hashes for cubrid_db-0.7.1-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6de6d0a1fcf366863cbedeef807b13e3a84cb951b384ee008d3a7e9f927c3726 |
|
MD5 | cc4182a2ce1b3b4190bb66a73c858d8b |
|
BLAKE2b-256 | c1ad95b1ebcbd13230c0efb570bfa029a89d8adf3b58d04f5d2d641a7d62178a |
Hashes for cubrid_db-0.7.1-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1c29507ba350390fac18457187ccfab460c70e1504565dcf1c2ddbefb0dddf9 |
|
MD5 | 149c2a998bc5a52c0d1224c1f8329dd2 |
|
BLAKE2b-256 | 75dd713134a9c28825ee4fd29e3522bf476212ac340ecd8990212f80c4c0950c |
Hashes for cubrid_db-0.7.1-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c52ccbf36e80d212e7326b9f27cf2988b6a14fefdae9867b41183d80845cb0a2 |
|
MD5 | 58d07d1da43816f07a5755e27c1c026f |
|
BLAKE2b-256 | 39d895ea6f42ec469e2b5ff0e4d7eeb90c13012a60bd44e33dcf229d0448baea |
Hashes for cubrid_db-0.7.1-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30e7aac6c0f0718f277de85f709ce1f27f1ba0b08bfd6446f1998565fec66af3 |
|
MD5 | c1de87d210cb14f0edab73d10a4fa069 |
|
BLAKE2b-256 | 38a0e017e3c5ae606650296e28da7de19bd1e37ccb07bb800db0b2bef6384008 |
Hashes for cubrid_db-0.7.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85f4c53ded78440e0054cde25b262308a60f549e20e369faf3d9591db9359ec6 |
|
MD5 | b7a74becb650c249461ff969884a5a0a |
|
BLAKE2b-256 | 90fddf054a763c66b27f877ee957110e6f783dbeba9ec7e33f062227b21931eb |
Hashes for cubrid_db-0.7.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e335ac39f169b19bba6f0a3ff18cfabc58afd37b1d6d6b78e882e36e0265fa3 |
|
MD5 | d09501ae63cd75eaf404382eda2d606e |
|
BLAKE2b-256 | dcddf496585951a3fc9f91587895165e88294f653e7505a03e44a43cf06d3b9d |
Hashes for cubrid_db-0.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c83b0037ac7bdc632155474fd63e8191058396969edc552286ae83241bed3714 |
|
MD5 | 5b3996f43c88779d7c0c6ab689154878 |
|
BLAKE2b-256 | 6fc2469e8579a3a356a3fe4dc166bdf64ca082888996cc7694674e354ab39a81 |
Hashes for cubrid_db-0.7.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff2cea3ffb4c79cf04a0e15eae852512a23a76b7730203805673322d3b60c034 |
|
MD5 | 9a70f681a4df35347cfeedbef45a377c |
|
BLAKE2b-256 | 073923283f4f19dbd9b3f95019a3b8902cc0bc91f6b4af85365a2a8b5b3983bd |
Hashes for cubrid_db-0.7.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0822199c8bbd2b6213eff1634d89103e4ce293765a3b60c035b03d57274ab5b0 |
|
MD5 | 0b09c3dc15981df6df26744ab5c52d33 |
|
BLAKE2b-256 | 78b499524bcc63738c5e50036ce8d891590b7a789b2239bf60e9c59ec2ab7ae4 |
Hashes for cubrid_db-0.7.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d1a1353ef21ca2a21ecf2298ea4af521750f9ef948afaed7574e60f0bc2480 |
|
MD5 | 7ce2a25af9883c0f42677acf048583a7 |
|
BLAKE2b-256 | 8e654867a2364ffb88e128a879c874b901b58e6a058b7ea232a5aaca2a6fe948 |
Hashes for cubrid_db-0.7.1-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8137d4e3eb58d900b0ceb26baa8b401df4990acae9205606ae2c79c4080312f7 |
|
MD5 | 49cad16e12d1afa0f0dc9106543977e4 |
|
BLAKE2b-256 | 7960b399b7f73d73e3d1a8745316611b7a23a5c1f94413c67d26b8cb5d3b5548 |
Hashes for cubrid_db-0.7.1-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 362778dd6aa150532759c4627715aa24153fc8d7c3bbae7e005705b949ddcea3 |
|
MD5 | 9d8f134f3d85df34d7a4de0734afe900 |
|
BLAKE2b-256 | 98a7c9dad30ad6d0384e85f6e38b6bebaf6baf058ebd520f6c195df70092434f |