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-1.0.0.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: couchbase_sqlalchemy-1.0.0.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1d41c60ed43c413d818f101df8a2b081e715c3cd1da91e3a16b10bedb2dac7da
MD5 56bd2a48318a2ca9a97e721da88e25b8
BLAKE2b-256 b0111a56c7942c241e95fa6c9a9a82fc446a63771b38ceac87e1a612fc6f067f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for couchbase_sqlalchemy-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b69edb75004257cbbc0cc1dabf2ab11e7beb40affe3ac59a25976a5996f0ea23
MD5 8ee1c8580a746275b7d61221ca07e5ae
BLAKE2b-256 b94277df3878281f61f299fd2b9f2cc9803b12fa7c4a2a0131e0a453fda3d26c

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