|
4 | 4 | [](https://github.com/Spiess/cottontaildb-python-client/actions/workflows/python-package.yml) |
5 | 5 |
|
6 | 6 | A Cottontail DB gRPC client for Python. Built with [Cottontail DB Proto](https://github.com/vitrivr/cottontaildb-proto) |
7 | | -version `0.14.0`. Comes with an interactive CLI for remote DB access. |
| 7 | +version `0.14.3`. Comes with an interactive CLI for remote DB access. |
| 8 | + |
| 9 | +Versions are numbered such that the first two numbers correspond with those of the compatible Cottontail DB Proto. |
8 | 10 |
|
9 | 11 | ## Installation |
10 | 12 |
|
@@ -50,15 +52,13 @@ file in the [Cottontail DB Proto](https://github.com/vitrivr/cottontaildb-proto) |
50 | 52 | The following is an approximate guide on how to do so from a terminal: |
51 | 53 |
|
52 | 54 | ```bash |
53 | | -# Get the latest version of the Cottontail DB proto |
54 | | -wget https://github.com/vitrivr/cottontaildb-proto/raw/master/src/main/protobuf/cottontail.proto |
| 55 | +# Get the latest version of the Cottontail DB proto (and download to cottontaildb_client directory) |
| 56 | +wget https://github.com/vitrivr/cottontaildb-proto/raw/master/src/main/protobuf/cottontail.proto -P ./cottontaildb_client/ |
55 | 57 | # Install necessary python packages |
56 | 58 | pip install grpcio grpcio-tools |
57 | 59 | # Generate the gRPC client |
58 | | -python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. cottontail.proto |
59 | | -# Update the client files (where PYTHON_CLIENT_PATH is the path to this repository) |
60 | | -mv cottontail_pb2.py cottontail_pb2_grpc.py $PYTHON_CLIENT_PATH/cottontaildb_client/ |
| 60 | +python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./cottontaildb_client/cottontail.proto |
61 | 61 | ``` |
62 | 62 |
|
63 | | -Finally, the line `import cottontail_pb2 as cottontail__pb2` in the file `cottontail_pb2_grpc.py` must be replaced |
64 | | -with `from . import cottontail_pb2 as cottontail__pb2`. |
| 63 | +It is important that the path to the `cottontail.proto` file reflects the location of the gRPC Python files, such that |
| 64 | +the imports can be generated correctly. |
0 commit comments