Skip to content

Commit

Permalink
Python: add missing exports (#2341)
Browse files Browse the repository at this point in the history
* Add missing python exports.

Signed-off-by: Yury-Fridlyand <[email protected]>

* Signed-off-by: Yury-Fridlyand <[email protected]>

* Signed-off-by: Yury-Fridlyand <[email protected]>

* Signed-off-by: Yury-Fridlyand <[email protected]>

* Revert: benchmark update

Signed-off-by: Andrew Carbonetto <[email protected]>

* Revert "Revert: benchmark update"

This reverts commit a26ca32.

Signed-off-by: Andrew Carbonetto <[email protected]>

* remove json

Signed-off-by: Shoham Elias <[email protected]>

---------

Signed-off-by: Yury-Fridlyand <[email protected]>
Signed-off-by: Andrew Carbonetto <[email protected]>
Signed-off-by: Shoham Elias <[email protected]>
Co-authored-by: Yury-Fridlyand <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]>
  • Loading branch information
3 people authored Sep 23, 2024
1 parent c8b2b50 commit 48c385e
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 10 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,10 @@
* Node: Fix ZADD bug where command could not be called with only the `changed` optional parameter ([#1995](https://github.com/valkey-io/valkey-glide/pull/1995))
* Java: `XRange`/`XRevRange` should return `null` instead of `GlideException` when given a negative count ([#1920](https://github.com/valkey-io/valkey-glide/pull/1920))
* Python: Fix `XClaim` return type to `List[bytes]` instead of `List[TEncodable]` ([#2075](https://github.com/valkey-io/valkey-glide/pull/2075))
* Python: Add missing exports ([2321](https://github.com/valkey-io/valkey-glide/pull/2321))

### Operational Enhancements
* CI/CD: Create Workflow to deploy artifacts for all platforms ([#2285](https://github.com/valkey-io/valkey-glide/pull/2285)
* CI/CD: Create Workflow to deploy artifacts for all platforms ([#2285](https://github.com/valkey-io/valkey-glide/pull/2285))
* Node: Get valkey/redis version using client's info command ([#2276](https://github.com/valkey-io/valkey-glide/pull/2276))
* Java: Fetch server version using client's info command ([#2258](https://github.com/valkey-io/valkey-glide/pull/2258))
* CI/CD: Add workflow for automating Maven release ([#2128](https://github.com/valkey-io/valkey-glide/pull/2128))
Expand Down Expand Up @@ -303,7 +304,7 @@
* Python: Added SETRANGE command ([#1453](https://github.com/valkey-io/valkey-glide/pull/1453))

#### Fixes
* Python: Fix typing error "type object is not subscriptable" ([#1203](https://github.com/valkey-io/valkey-glide/pull/1203))
* Python: Fix typing error "'type' object is not subscriptable" ([#1203](https://github.com/valkey-io/valkey-glide/pull/1203))
* Core: Fixed blocking commands to use the specified timeout from the command argument ([#1283](https://github.com/valkey-io/valkey-glide/pull/1283))

### Breaking Changes
Expand Down
7 changes: 5 additions & 2 deletions benchmarks/python/python_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
import numpy as np
import redis.asyncio as redispy # type: ignore
from glide import (
BaseClientConfiguration,
GlideClientConfiguration,
GlideClusterClientConfiguration,
GlideClient,
GlideClusterClient,
Logger,
Expand Down Expand Up @@ -289,7 +290,9 @@ async def main(
if clients_to_run == "all" or clients_to_run == "glide":
# Glide Socket
client_class = GlideClusterClient if is_cluster else GlideClient
config = BaseClientConfiguration(
config = GlideClusterClientConfiguration(
[NodeAddress(host=host, port=port)], use_tls=use_tls
) if is_cluster else GlideClientConfiguration(
[NodeAddress(host=host, port=port)], use_tls=use_tls
)
clients = await create_clients(
Expand Down
41 changes: 35 additions & 6 deletions python/python/glide/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
SignedEncoding,
UnsignedEncoding,
)
from glide.async_commands.command_args import Limit, ListDirection, OrderBy
from glide.async_commands.command_args import Limit, ListDirection, ObjectType, OrderBy
from glide.async_commands.core import (
ConditionalChange,
CoreCommands,
Expand Down Expand Up @@ -64,10 +64,13 @@
TrimByMaxLen,
TrimByMinId,
)
from glide.async_commands.transaction import ClusterTransaction, Transaction
from glide.async_commands.transaction import (
ClusterTransaction,
Transaction,
TTransaction,
)
from glide.config import (
BackoffStrategy,
BaseClientConfiguration,
GlideClientConfiguration,
GlideClusterClientConfiguration,
NodeAddress,
Expand All @@ -77,7 +80,19 @@
ReadFrom,
ServerCredentials,
)
from glide.constants import OK
from glide.constants import (
OK,
TOK,
TClusterResponse,
TEncodable,
TFunctionListResponse,
TFunctionStatsFullResponse,
TFunctionStatsSingleNodeResponse,
TResult,
TSingleNodeRoute,
TXInfoStreamFullResponse,
TXInfoStreamResponse,
)
from glide.exceptions import (
ClosingError,
ConfigurationError,
Expand All @@ -87,14 +102,15 @@
RequestError,
TimeoutError,
)
from glide.glide_client import GlideClient, GlideClusterClient
from glide.glide_client import GlideClient, GlideClusterClient, TGlideClient
from glide.logger import Level as LogLevel
from glide.logger import Logger
from glide.routes import (
AllNodes,
AllPrimaries,
ByAddressRoute,
RandomNode,
Route,
SlotIdRoute,
SlotKeyRoute,
SlotType,
Expand All @@ -110,8 +126,9 @@
"GlideClusterClient",
"Transaction",
"ClusterTransaction",
"TGlideClient",
"TTransaction",
# Config
"BaseClientConfiguration",
"GlideClientConfiguration",
"GlideClusterClientConfiguration",
"BackoffStrategy",
Expand All @@ -123,6 +140,15 @@
"PeriodicChecksStatus",
# Response
"OK",
"TClusterResponse",
"TEncodable",
"TFunctionListResponse",
"TFunctionStatsFullResponse",
"TFunctionStatsSingleNodeResponse",
"TOK",
"TResult",
"TXInfoStreamFullResponse",
"TXInfoStreamResponse",
# Commands
"BitEncoding",
"BitFieldGet",
Expand Down Expand Up @@ -166,6 +192,7 @@
"RangeByLex",
"RangeByScore",
"ScoreFilter",
"ObjectType",
"OrderBy",
"ExclusiveIdBound",
"IdBound",
Expand All @@ -189,13 +216,15 @@
"Logger",
"LogLevel",
# Routes
"Route",
"SlotType",
"AllNodes",
"AllPrimaries",
"ByAddressRoute",
"RandomNode",
"SlotKeyRoute",
"SlotIdRoute",
"TSingleNodeRoute",
# Exceptions
"ClosingError",
"ConfigurationError",
Expand Down

0 comments on commit 48c385e

Please sign in to comment.