Skip to main content

3 posts tagged with "django"

django tag description

View All Tags

How to Measure Execution Time in Python: Vanilla Python, FastAPI, Flask, and Django

· 8 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Measuring how long your Python code takes to run is a critical skill for performance optimization, benchmarking, and identifying bottlenecks in production applications. Depending on whether you are analyzing a single micro-operation, profiling a complex function, or tracking HTTP request-response lifecycles, Python offers a wide variety of tools.

This guide provides a comprehensive breakdown of how to measure execution time in vanilla Python, followed by specialized implementations for the three major web frameworks: FastAPI, Flask, and Django.

How to Connect and Integrate Supabase with Python: FastAPI, Flask, and Django

· 8 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

Supabase is a popular PostgreSQL-based BaaS (Backend-as-a-Service). Because it runs on a standard PostgreSQL database, you can connect to it using traditional database drivers (like psycopg2 or SQLAlchemy) or leverage its built-in REST API using client SDKs.

This guide provides a comprehensive walkthrough for integrating Supabase into your Python web applications, detailing implementations for FastAPI, Flask, and Django.

Managing database queries in Django applications and where save the queries

· 8 min read
Serhii Hrekov
Senior Software Engineer & System Architect specializing in Python, Web Systems, Cloud Infrastructure & Automation

As a Django app grows, managing database queries effectively is crucial for maintainability, performance, and testability. Storing them haphazardly is a recipe for disaster. The best place to store your queries is on custom Model Managers and QuerySets. This approach keeps your logic organized, reusable, and closely tied to the data it operates on. Here are the main variants for storing your queries, from the least recommended to the best practice.