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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: couchbase_sqlalchemy-0.1.14.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.14.tar.gz
Algorithm Hash digest
SHA256 83f7e7e0bc7add8c4ee117e6669f6054a207457aa8a6c83804b7fa67da9c2fc5
MD5 9983dee6657dea27bb8344b3b6d352ec
BLAKE2b-256 ad73d81e0cd2784c6ecf996617bbf26588e47f9a69e3d5dd990ffdffd7b23108

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for couchbase_sqlalchemy-0.1.14-py3-none-any.whl
Algorithm Hash digest
SHA256 aa09783fd461b1c240e6bccb4b263bacfb0098cd328d89e743b7df06b4e1829e
MD5 28389ff019b7c8408b19b8440b67b7a9
BLAKE2b-256 c4ad6a9a3ec49cf8b056c729fa14d96c3318420a37f0902d8e51cc7536976e5d

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