Couchbase SQLAlchemy
=====================
Couchbase dialect for SQLAlchemy to `Couchbase Analytics/Columnar <https://docs.couchbase.com/server/current/learn/services-and-indexes/services/analytics-service.html/>`_.
A Python client library for Couchbase Analytics, `couchbase-sqlalchemy` provides a comprehensive DB-API and SQLAlchemy dialect implementation for Couchbase.
.. image:: https://img.shields.io/pypi/v/couchbase-sqlalchemy.svg
:target: https://pypi.python.org/pypi/couchbase-sqlalchemy/
.. image:: https://img.shields.io/:license-Apache%202-brightgreen.svg
:target: http://www.apache.org/licenses/LICENSE-2.0.txt
Installing Couchbase SQLAlchemy
===============================
The Couchbase SQLAlchemy package can be installed from the public PyPI repository using pip:
.. code-block:: shell
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:
.. code-block:: python
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)
2. Replace <your_user_login_name>, <your_password>, and <host> and <port> with the appropriate values for your Couchbase account and user.
3. Execute the sample code. For example, if you created a file named test.py:
.. code-block:: shell
python test.py
License
=======
Couchbase SQLAlchemy is distributed under the `Apache 2.0
<https://www.apache.org/licenses/LICENSE-2.0>`_.
Raw data
{
"_id": null,
"home_page": null,
"name": "couchbase-sqlalchemy",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "Couchbase db database cloud analytics Columnar",
"author": "Ayush Tripathi",
"author_email": "ayush.tripathi@couchbase.com",
"download_url": "https://files.pythonhosted.org/packages/4b/bd/322aef80dd15cf79b959f5e2357da57a5d1d1b4f62e009fdcce44547251e/couchbase_sqlalchemy-1.0.1.tar.gz",
"platform": null,
"description": "Couchbase SQLAlchemy\n=====================\n\nCouchbase dialect for SQLAlchemy to `Couchbase Analytics/Columnar <https://docs.couchbase.com/server/current/learn/services-and-indexes/services/analytics-service.html/>`_.\nA Python client library for Couchbase Analytics, `couchbase-sqlalchemy` provides a comprehensive DB-API and SQLAlchemy dialect implementation for Couchbase.\n\n.. image:: https://img.shields.io/pypi/v/couchbase-sqlalchemy.svg\n :target: https://pypi.python.org/pypi/couchbase-sqlalchemy/\n\n.. image:: https://img.shields.io/:license-Apache%202-brightgreen.svg\n :target: http://www.apache.org/licenses/LICENSE-2.0.txt\n\n\nInstalling Couchbase SQLAlchemy\n===============================\n\nThe Couchbase SQLAlchemy package can be installed from the public PyPI repository using pip:\n\n .. code-block:: shell\n\n pip install --upgrade couchbase-sqlalchemy\n\nRun a Simple query\n==================\n\n1.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:\n\n .. code-block:: python\n\n import urllib.parse\n from sqlalchemy import create_engine\n # Define the Couchbase connection string (replace with your details)\n URL = 'couchbase://<username>:<password>@<host>:<port>?ssl=false'\n # Create the engine for Couchbase using the Couchbase SQLAlchemy dialect\n engine = create_engine(COUCHBASE_URL)\n query_result = engine.execute(\"select locate('something','there is something good');\")\n result = query_result.fetchall()\n print(result)\n\n2. Replace <your_user_login_name>, <your_password>, and <host> and <port> with the appropriate values for your Couchbase account and user.\n\n3. Execute the sample code. For example, if you created a file named test.py:\n\n .. code-block:: shell\n\n python test.py\n\n\nLicense\n=======\n\nCouchbase SQLAlchemy is distributed under the `Apache 2.0\n<https://www.apache.org/licenses/LICENSE-2.0>`_.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A SQLAlchemy dialect for Couchbase Analytics/Columnar.",
"version": "1.0.1",
"project_urls": null,
"split_keywords": [
"couchbase",
"db",
"database",
"cloud",
"analytics",
"columnar"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c5f8456e6160b8e81a2b215406364a1acc41f4a33f230ee3bcdcf38e09e72f25",
"md5": "52f0099784f6e03982957ca732c4837a",
"sha256": "7aa28d37bdefaee20abcfef2f4ffdbf887ae6f39d45cee65e0bb6e8139b1ee6c"
},
"downloads": -1,
"filename": "couchbase_sqlalchemy-1.0.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "52f0099784f6e03982957ca732c4837a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 12254,
"upload_time": "2024-10-13T17:48:30",
"upload_time_iso_8601": "2024-10-13T17:48:30.073251Z",
"url": "https://files.pythonhosted.org/packages/c5/f8/456e6160b8e81a2b215406364a1acc41f4a33f230ee3bcdcf38e09e72f25/couchbase_sqlalchemy-1.0.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4bbd322aef80dd15cf79b959f5e2357da57a5d1d1b4f62e009fdcce44547251e",
"md5": "434390175e70a4c4ca27b17ba9ba25a3",
"sha256": "448bc47c7ccc81df274914e216c6ae2d7b286bc004a866c1cdf1611c837d0ec4"
},
"downloads": -1,
"filename": "couchbase_sqlalchemy-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "434390175e70a4c4ca27b17ba9ba25a3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 11836,
"upload_time": "2024-10-13T17:48:32",
"upload_time_iso_8601": "2024-10-13T17:48:32.112294Z",
"url": "https://files.pythonhosted.org/packages/4b/bd/322aef80dd15cf79b959f5e2357da57a5d1d1b4f62e009fdcce44547251e/couchbase_sqlalchemy-1.0.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-13 17:48:32",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "couchbase-sqlalchemy"
}