A SQLAlchemy dialect for Couchbase Analytics/Columnar.
Project description
Couchbase SQLAlchemy
Couchbase dialect for SQLAlchemy to Couchbase Analytics/Columnar. A Python client library for Couchbase Analytics, couchbase-sqlalchemy provides a comprehensive DB-API and SQLAlchemy dialect implementation for Couchbase.
Installing Couchbase SQLAlchemy
The Couchbase SQLAlchemy package can be installed from the public PyPI repository using pip:
pip install --upgrade couchbase-sqlalchemy
Run a Simple query
1.Creatge a file (e.g. test.py) that contains the following Python sample code, which connects to Couchbase Analytics and displays a simple locate function query:
import urllib.parse from sqlalchemy import create_engine # Define the Couchbase connection string (replace with your details) URL = 'couchbase://<username>:<password>@<host>:<port>?ssl=false' # Create the engine for Couchbase using the Couchbase SQLAlchemy dialect engine = create_engine(COUCHBASE_URL) query_result = engine.execute("select locate('something','there is something good');") result = query_result.fetchall() print(result)
Replace <your_user_login_name>, <your_password>, and <host> and <port> with the appropriate values for your Couchbase account and user.
Execute the sample code. For example, if you created a file named test.py:
python test.py
License
Couchbase SQLAlchemy is distributed under the Apache 2.0.
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
File details
Details for the file couchbase_sqlalchemy-0.1.13.tar.gz
.
File metadata
- Download URL: couchbase_sqlalchemy-0.1.13.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a74c38c4b7841a375ea3a01afe81b7bf8221e73bbf667044427bb39d97455b92 |
|
MD5 | d8aec4a7ccc6f6bdeb4f3ae272dccb45 |
|
BLAKE2b-256 | d35c137a126df4e08cfa5123ba071c135d3c9a7cbec916547e757951a2c328d5 |
File details
Details for the file couchbase_sqlalchemy-0.1.13-py3-none-any.whl
.
File metadata
- Download URL: couchbase_sqlalchemy-0.1.13-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb1f990f21f0f160cdd4271ecd4d2ddcab3c89fe98f2e31d4ac768b4b6a4026b |
|
MD5 | b7682d44fdbcacf8633176d4eee26957 |
|
BLAKE2b-256 | 978f6d6255e14f8a4413559e1c2061e6071b7aa8ad1ddaa441ac69272920beb0 |