Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,25 @@ The Analytics SDK supports static typing. Currently only [mypy](https://github.

# Installing the SDK<a id="installing-the-sdk"></a>

Until a version is available on PyPI, the SDK can be installed via pip with the following command (note the `dev` branch in the url).
>Note: It is strongly recommended to update pip, setuptools and wheel prior to installing the SDK: `python3 -m pip install --upgrade pip setuptools wheel`

Install the SDK via `pip`:
```console
python3 -m pip install git+https://github.com/couchbaselabs/analytics-python-client@dev
python3 -m pip install couchbase-analytics
```

# Installing the SDK from source

The SDK can be installed from source via pip with the following command.

Install the SDK via `pip`:
```console
python3 -m pip install git+https://github.com/couchbase/analytics-python-client.git
```

# Using the SDK<a id="using-the-sdk"></a>

Some more examples are provided in the [examples directory](https://github.com/couchbaselabs/analytics-python-client/tree/dev/examples).
Some more examples are provided in the [examples directory](https://github.com/couchbase/analytics-python-client/tree/main/examples).

**Connecting and executing a query**
```python
Expand Down
2 changes: 1 addition & 1 deletion acouchbase_analytics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/cluster.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import sys
Expand Down
2 changes: 1 addition & 1 deletion acouchbase_analytics/cluster.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/credential.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,4 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from couchbase_analytics.common.credential import Credential as Credential # noqa: F401
3 changes: 2 additions & 1 deletion acouchbase_analytics/database.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import sys
Expand Down
2 changes: 1 addition & 1 deletion acouchbase_analytics/database.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/deserializer.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from couchbase_analytics.common.deserializer import DefaultJsonDeserializer as DefaultJsonDeserializer # noqa: F401
from couchbase_analytics.common.deserializer import Deserializer as Deserializer # noqa: F401
from couchbase_analytics.common.deserializer import PassthroughDeserializer as PassthroughDeserializer # noqa: F401
3 changes: 2 additions & 1 deletion acouchbase_analytics/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from couchbase_analytics.common.errors import AnalyticsError as AnalyticsError # noqa: F401
from couchbase_analytics.common.errors import InternalSDKError as InternalSDKError # noqa: F401
from couchbase_analytics.common.errors import InvalidCredentialError as InvalidCredentialError # noqa: F401
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/options.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from couchbase_analytics.common.options import ClusterOptions as ClusterOptions # noqa: F401
from couchbase_analytics.common.options import ClusterOptionsKwargs as ClusterOptionsKwargs # noqa: F401
from couchbase_analytics.common.options import QueryOptions as QueryOptions # noqa: F401
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import asyncio
import selectors
from typing import Optional
Expand Down
14 changes: 14 additions & 0 deletions acouchbase_analytics/protocol/_core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
16 changes: 16 additions & 0 deletions acouchbase_analytics/protocol/_core/anyio_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

from asyncio import AbstractEventLoop
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/_core/async_json_stream.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

from typing import AsyncIterator, Callable, Optional
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

from typing import Any, Callable, Coroutine, List, Optional
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/_core/client_adapter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import logging
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/_core/net_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import socket
Expand Down
16 changes: 16 additions & 0 deletions acouchbase_analytics/protocol/_core/request_context.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import json
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/_core/retries.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

from asyncio import CancelledError
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/cluster.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import sys
Expand Down
2 changes: 1 addition & 1 deletion acouchbase_analytics/protocol/cluster.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/database.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import sys
Expand Down
2 changes: 1 addition & 1 deletion acouchbase_analytics/protocol/database.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import socket
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/scope.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import sys
Expand Down
2 changes: 1 addition & 1 deletion acouchbase_analytics/protocol/scope.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/protocol/streaming.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

from typing import Any, Optional
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/query.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from couchbase_analytics.common.enums import QueryScanConsistency as QueryScanConsistency # noqa: F401
from couchbase_analytics.common.query import QueryMetadata as QueryMetadata # noqa: F401
from couchbase_analytics.common.query import QueryMetrics as QueryMetrics # noqa: F401
Expand Down
3 changes: 2 additions & 1 deletion acouchbase_analytics/result.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,5 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from couchbase_analytics.common.result import AsyncQueryResult as AsyncQueryResult # noqa: F401
from couchbase_analytics.common.result import QueryResult as QueryResult # noqa: F401
3 changes: 2 additions & 1 deletion acouchbase_analytics/scope.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2016-2024. Couchbase, Inc.
# Copyright 2016-2025. Couchbase, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import annotations

import sys
Expand Down
Loading