Skip to main content

A SQLAlchemy dialect for Couchbase Analytics.

Project description

Couchbase SQLAlchemy

Couchbase dialect for SQLAlchemy to Couchbase Analytics. 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)
COUCHBASE_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.3.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

couchbase_sqlalchemy-1.0.3-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: couchbase_sqlalchemy-1.0.3.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.5

File hashes

Hashes for couchbase_sqlalchemy-1.0.3.tar.gz
Algorithm Hash digest
SHA256 80c8cca9efb102c03568b920f40af1742ff3c4e0b66ef0f045c4c6b34169d0ed
MD5 b770e3ed762cb78429a9583f9ba35caa
BLAKE2b-256 b2ce845fb5f2ce9ea7459d2607b9712346b2a79aae67ef747d079a5d602022cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for couchbase_sqlalchemy-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 faf9ddcc49cddf12e6168c25f2f935e541c0c10aed5ccc99b3ac50214662b14d
MD5 26e0bbfb38d2083df7e3e9a364d7ce45
BLAKE2b-256 b2b1202cc5268dd259e77eba9e37af1280a269ffd71ac4a0ab0aee0181f02f51

See more details on using hashes here.

Supported by

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