Skip to main content

Couchbase SQLAlchemy

Couchbase dialect for SQLAlchemy to Couchbase Analytics. A Python client library for Couchbase Analytics, couchbase-sqlalchemy provides a comprehensive DB-API and SQLAlchemy dialect implementation for Couchbase.

https://img.shields.io/pypi/v/couchbase-sqlalchemy.svg https://img.shields.io/:license-Apache%202-brightgreen.svg

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)
COUCHBASE_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)
  1. Replace <your_user_login_name>, <your_password>, and <host> and <port> with the appropriate values for your Couchbase account and user.

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

Release files for couchbase-sqlalchemy 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for couchbase-sqlalchemy 1.0.3
File Size Uploaded
couchbase_sqlalchemy-1.0.3.tar.gz 12.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for couchbase-sqlalchemy 1.0.3
File Interpreter ABI Platform
couchbase_sqlalchemy-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 25.0 kB

Release files / couchbase_sqlalchemy-1.0.3.tar.gz

Download URL couchbase_sqlalchemy-1.0.3.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
80c8cca9efb102c03568b920f40af1742ff3c4e0b66ef0f045c4c6b34169d0ed
BLAKE2b-256 checksum
How to use checksums
b2ce845fb5f2ce9ea7459d2607b9712346b2a79aae67ef747d079a5d602022cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release files / couchbase_sqlalchemy-1.0.3-py3-none-any.whl

Download URL couchbase_sqlalchemy-1.0.3-py3-none-any.whl
Size 12.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faf9ddcc49cddf12e6168c25f2f935e541c0c10aed5ccc99b3ac50214662b14d
BLAKE2b-256 checksum
How to use checksums
b2b1202cc5268dd259e77eba9e37af1280a269ffd71ac4a0ab0aee0181f02f51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.5

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page