Skip to main content

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.

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

couchbase_sqlalchemy-0.1.13.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

couchbase_sqlalchemy-0.1.13-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

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

Hashes for couchbase_sqlalchemy-0.1.13.tar.gz
Algorithm Hash digest
SHA256 a74c38c4b7841a375ea3a01afe81b7bf8221e73bbf667044427bb39d97455b92
MD5 d8aec4a7ccc6f6bdeb4f3ae272dccb45
BLAKE2b-256 d35c137a126df4e08cfa5123ba071c135d3c9a7cbec916547e757951a2c328d5

See more details on using hashes here.

File details

Details for the file couchbase_sqlalchemy-0.1.13-py3-none-any.whl.

File metadata

File hashes

Hashes for couchbase_sqlalchemy-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1f990f21f0f160cdd4271ecd4d2ddcab3c89fe98f2e31d4ac768b4b6a4026b
MD5 b7682d44fdbcacf8633176d4eee26957
BLAKE2b-256 978f6d6255e14f8a4413559e1c2061e6071b7aa8ad1ddaa441ac69272920beb0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page