The Polypheny Prism-API (Prism-API) leverages Google’s Protocol Buffers (protobuf) version 3 for defining and serializing data. This approach allows to define the schema and describe the structure of the data our API exchanges within .proto
files, which serve as the blueprint for message formats. Developers can use these .proto
files to automatically generate code for creating, parsing, and managing these structured messages across a wide array of programming languages, ensuring a high level of flexibility and interoperability for systems that utilize the Prism-API. More details about Protobuf in general can be found in the official Protobuf Documentation.
Proto Files
To get started with Prism-Interface API, developers will first need to obtain the .proto
files. The complete set of .proto
files for the Prism-API is readily available for download from our Git repository.
Code Generation
To generate code from the message definitions in the .proto
files, the Google Protocol Buffers compiler, protoc
, is used. This tool converts .proto
file definitions into source code in various programming languages, enabling developers to use the Prism-Interface in their preferred coding environment. To use protoc
, one simply needs to invoke it from the command line, specifying the source .proto
file and the desired output language. For example, running protoc --java_out=. myfile.proto
would generate Java code from myfile.proto
. The Protocol Buffers compiler supports multiple languages, including Java, C++, Python, Go and more, with the ability to add support for others through plugins. Developers can download the latest version of protoc
from the Protocol Buffers GitHub repository, where detailed installation instructions and comprehensive documentation are also available.
Next steps
Detailed information about the different .proto
and the messages they contain can be found in the corresponding documentation.