Understand Async Await in Python

Async/await is a powerful programming construct that allows you to write asynchronous code in a synchronous-like style. It was introduced in Python 3.5 as part of the asyncio module and has become a popular choice for writing concurrent and parallel code in Python. In this post, we’ll take a look at what async/await is and how it works, as well as some of the benefits and drawbacks of using it. We’ll also see some examples of how to use async/await in Python to write efficient and scalable code....

January 1, 2023 · 5 min · 1030 words

Create a Telegram Bot With Rust

Install Rust Before you can start writing Rust code, you’ll need to install the Rust programming language on your computer. You can do this by following the instructions on the Rust website (https://www.rust-lang.org/tools/install). Set up a new Rust project Once you have Rust installed, you’ll need to create a new Rust project using the cargo command-line tool. Open a terminal and navigate to the directory where you want to store your project, then run the following command: cargo new telegram-bot –bin....

December 31, 2022 · 4 min · 733 words

Create a Webserver With Fastapi and Uvicorn

FastAPI is a modern, fast, web framework for building APIs with Python 3.7 and above. It is built on top of Starlette, a lightweight ASGI framework, and uses the uvicorn ASGI server. Here is an example of how to create a web server with FastAPI and uvicorn: Install FastAPI and uvicorn using pip: pip install fastapi uvicorn Create a file called main.py and import FastAPI: from fastapi import FastAPI app = FastAPI() Define a function that will be the endpoint for your API....

December 30, 2022 · 1 min · 186 words

What Does Yield Keyword Do in Python

The keyword “yield” is a important part of the Python programming language, and it can be used in a number of different ways. In this article, we’ll take a closer look at what the yield keyword does in Python, and how it can be used to create more efficient and powerful programs. The primary use of the yield keyword is to create a generator function. A generator function is a special type of function that produces a sequence of values, one at a time, when it is called....

December 29, 2022 · 3 min · 440 words

Use Protobuf With Golang

Protocol Buffers (Protobuf) is a language- and platform-neutral data serialization format developed by Google. It allows you to define data structures in a .proto file and then use code generation tools to generate code in various languages for working with those data structures. To use Protobuf with Go, you’ll need to do the following: Install the Protobuf compiler (protoc) and the Go Protobuf plugin: # Install protoc wget https://github.com/protocolbuffers/protobuf/releases/download/v3.14.0/protoc-3.14.0-linux-x86_64.zip unzip protoc-3....

December 27, 2022 · 2 min · 425 words