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.Create 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.12.tar.gz (11.7 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file couchbase_sqlalchemy-0.1.12.tar.gz.

File metadata

  • Download URL: couchbase_sqlalchemy-0.1.12.tar.gz
  • Upload date:
  • Size: 11.7 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.12.tar.gz
Algorithm Hash digest
SHA256 0713563459129b5bd9952cf8321a75ebb9b99d9044466b86b78e1cf73937a0c1
MD5 14be013c853b65accf6570668e43433f
BLAKE2b-256 d15de115fd461e9d204e76514e52c23345e0eaa1a46588e2fb777b1925741263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for couchbase_sqlalchemy-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 0f58139c35ebf052f5f9f3663cbbf7a5bb0265218844e11ba6b84ddaec7a29cf
MD5 d11fb3f1f6b6bfbc58a5dcafdacdc4ca
BLAKE2b-256 1f3e65be2ace46400fef54ad99e9a270e26c8e4de68c36f9803e2348f4abbe14

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