Skip to main content

Insight Python Protobuf

Project description

Language Independent Interface Types For INSIGHT

The proto files can be consumed as GIT submodules or copied and built directly in the consumer project.

The compiled files are published to central repositories (Maven, ...).

Prerequisites

Python

pip install grpcio grpcio-tools mypy-protobuf

Go

# protoc (protobuf compiler)
# Ubuntu/Debian:
sudo apt install -y protobuf-compiler
# macOS:
brew install protobuf

# Go protobuf plugins
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/srikrsna/protoc-gen-gotag@latest

Ensure $GOPATH/bin (usually ~/go/bin) is on your PATH.

Generate gRPC Client Libraries

To generate the raw gRPC client libraries, use make gen-${LANGUAGE}. Currently supported languages are:

  • python
  • golang

Using local build

When testing you can build the python version locally using make build-python. This will build a version of 0.0.1-dev, this can then be installed using pip install.

make build-python VERSION=0.0.2

Then update the agent pyproject.yaml

dependencies = [
    "insight-proto @ file:///home/bdonnell/repo/github/opentrace/insight-proto/build/python",
]

Then run pip install for the agent:

pip install -e".[dev]"

Due to this being a dev build sometimes pip gets confused so you might need to run uninstall.

pip uninstall insight-proto

Go

Build the Go protobuf locally and update the insight-proto-go submodule:

make build-go-local

Then in your Go service, add a replace directive in go.mod to point at your local copy:

replace github.com/opentrace/insight-proto-go => /home/bdonnell/repo/github/opentrace/insight-proto/insight-proto-go

Releasing

To release this we use GitHub Actions when a new release is tagged via GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

insight_proto-0.0.57.tar.gz (48.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

insight_proto-0.0.57-py3-none-any.whl (72.7 kB view details)

Uploaded Python 3

File details

Details for the file insight_proto-0.0.57.tar.gz.

File metadata

  • Download URL: insight_proto-0.0.57.tar.gz
  • Upload date:
  • Size: 48.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for insight_proto-0.0.57.tar.gz
Algorithm Hash digest
SHA256 e051585dc962cb88d7ebc37e7d2a6ab85acba7ee057b888933861ce0f1f5bca8
MD5 6f35b9a09bfed7ccc090be8c097d7324
BLAKE2b-256 5b01ed92535a47e9f9cfe422f3e8403179133115cd73a3a8f5cca39f2d6e7e22

See more details on using hashes here.

File details

Details for the file insight_proto-0.0.57-py3-none-any.whl.

File metadata

  • Download URL: insight_proto-0.0.57-py3-none-any.whl
  • Upload date:
  • Size: 72.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for insight_proto-0.0.57-py3-none-any.whl
Algorithm Hash digest
SHA256 517103214751572b2d43582de8e76d028557a557b37445564a6523e5215d1fcc
MD5 2dcc885cf4b97e5c1e19a3c8bf90b96b
BLAKE2b-256 bc3bc2235b41aa25112e3d1c21d707c6634c4737cfbe0af9cfcddd5423adf2c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page