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

Uploaded Source

Built Distribution

couchbase_sqlalchemy-1.0.1-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: couchbase_sqlalchemy-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 448bc47c7ccc81df274914e216c6ae2d7b286bc004a866c1cdf1611c837d0ec4
MD5 434390175e70a4c4ca27b17ba9ba25a3
BLAKE2b-256 4bbd322aef80dd15cf79b959f5e2357da57a5d1d1b4f62e009fdcce44547251e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for couchbase_sqlalchemy-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7aa28d37bdefaee20abcfef2f4ffdbf887ae6f39d45cee65e0bb6e8139b1ee6c
MD5 52f0099784f6e03982957ca732c4837a
BLAKE2b-256 c5f8456e6160b8e81a2b215406364a1acc41f4a33f230ee3bcdcf38e09e72f25

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