How to Call the OpenAI API in Python: Streaming, Retries, and Errors
Use the v1 OpenAI Python client properly: explicit timeouts, bounded retries, specific error handling, streaming output, and tests…
Category
These backend development guides cover the parts users never see: data, queues and services. Most posts compare two options and explain when each wins.
For example, SQL vs NoSQL and Kafka vs RabbitMQ help with common choices. Also, monolith vs microservices tackles the biggest one. Language series live in the Java, Python and Node.js sections below.
149 articles
Use the v1 OpenAI Python client properly: explicit timeouts, bounded retries, specific error handling, streaming output, and tests…
Executive Summary: Java modules group packages behind a module-info.java file that declares what a module requires, exports, and…
Kafka vs RabbitMQ decided on model shape, not brand: the durable log versus classic routing, when to use…
Executive Summary: Reflection lets Java code inspect and call classes at runtime through Class, Method, Field, and Constructor…
Python 3.12 brings cleaner generic syntax, unrestricted f-strings, smarter error messages, and the removal of distutils. Here is…
Executive Summary: Java annotations are types declared with @interface whose elements hold compile-time constants. I cover built-ins like…
Build a complete task API with FastAPI: typed request and response models, a database session per request, proper…
The circuit breaker pattern: the three circuit breaker states, failing fast with real fallbacks, and the bulkhead pattern…
Executive Summary: This practice project analyzes a sales CSV with Java streams. You model rows as a validated…
Executive Summary: NIO.2’s Path and Files replace string-built file paths and verbose IO code. I’ll cover building and…
Validate untrusted data with typed models, write field and model validators, serialize with model_dump, and load typed settings…
Executive Summary: Classic Java file I/O splits into byte streams for binary data and readers and writers for…
Service discovery: how the service registry tracks who is up, the client-side vs server-side discovery comparison, and the…
Load a CSV into a DataFrame, clean it, filter rows, add columns, and summarize with groupby, using a…