2019-06-11 20:05:04 +01:00
|
|
|
# Using the gRPC API
|
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
[gRPC](https://grpc.io/) is the main API for interfacing with CORE and used by
|
|
|
|
the python GUI for driving all functionality.
|
|
|
|
|
|
|
|
Currently we are providing a python client that wraps the generated files for
|
|
|
|
leveraging the API, but proto files noted below can also be leveraged to generate
|
|
|
|
bindings for other languages as well.
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2019-10-19 05:51:15 +01:00
|
|
|
## HTTP Proxy
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
Since gRPC is HTTP2 based, proxy configurations can cause issue. You can either
|
|
|
|
properly account for this issue or clear out your proxy when running if needed.
|
2019-06-11 20:05:04 +01:00
|
|
|
|
|
|
|
## Python Client
|
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
A python client wrapper is provided at
|
|
|
|
[CoreGrpcClient](../daemon/core/api/grpc/client.py) to help provide some
|
|
|
|
conveniences when using the API.
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
## Proto Files
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
Proto files are used to define the API and protobuf messages that are used for
|
|
|
|
interfaces with this API.
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
They can be found [here](../daemon/proto/core/api/grpc) to see the specifics of
|
|
|
|
what is going on and response message values that would be returned.
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
## Examples
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
Example usage of this API can be found [here](../daemon/examples/grpc). These
|
|
|
|
examples will create a session using the gRPC API when the core-daemon is running.
|
2019-06-11 20:05:04 +01:00
|
|
|
|
2020-06-05 19:20:23 +01:00
|
|
|
You can then switch to and attach to these sessions using either of the CORE GUIs.
|