Skip to main content

Featured

Building a gRPC Service with Nested Messages, Repeated Fields, and Oneof in Python

Introduction:  gRPC is a high-performance, open-source framework developed by Google for building efficient and scalable distributed systems. It provides a language-agnostic way to define and implement services using Protocol Buffers (protobuf) as the interface definition language. In this tutorial, we'll explore how to build a gRPC service in Python that incorporates advanced features such as nested messages, repeated fields, and oneof. These features allow us to create complex data structures and handle scenarios where multiple values or mutually exclusive fields are involved.   Prerequisites: Basic understanding of gRPC and Protocol Buffers. Python development environment set up.   Step 1: Define the Protocol Buffers (protobuf) File  Start by defining the service and message definitions in a proto file. Here's an example of a proto file named example.proto that defines a gRPC service with nested messages, repeated fields, and oneof: syntax = "proto3" ; package

How To Update .gitignore File

A gitignore file specifies intentionally untracked files that Git should ignore. Files already tracked by Git are not affected. So extra step is needed to update your HEAD.

Steps to clear git cache and refresh or update .gitignore file:

1. Make changes in .gitignore file
2. Open your terminal and run:
    git rm -r --cached .
3. git commit your changes or continue working.
 

 

Comments