Best Practices

Learn Python programming best practices and write more organized, readable, and professional code.

Dicas para otimizar scripts Python lentos
Best Practices
Foto de perfil de Leandro Hirt da Academify

Slow Python Scripts: Profiling and Optimization

Learn why Python scripts run slowly and how to fix it: use built-ins, list comprehensions, sets, generators, NumPy, cProfile profiling,

Read more

Reading time: 3 minutes
June 3, 2026
Problemas de travamento com threading em scripts Python
Best Practices
Foto de perfil de Leandro Hirt da Academify

Python Threading: Threads, Locks, Concurrency

Learn Python threading: why scripts freeze, create and start threads, use join(), avoid race conditions with Lock, and use ThreadPoolExecutor

Read more

Reading time: 4 minutes
June 3, 2026
Criação de cliente TCP simples usando Python
Best Practices
Foto de perfil de Leandro Hirt da Academify

Python Sockets: Build a TCP Client

Build a simple Python TCP client using the socket module: connect to a server, send and receive bytes, handle errors,

Read more

Reading time: 3 minutes
June 3, 2026
Criação de hashes seguros para senhas usando Python
Best Practices
Foto de perfil de Leandro Hirt da Academify

Password Hashing with bcrypt in Python

Learn Python password hashing with bcrypt: generate secure hashes, verify passwords, understand salt, and build a complete authentication system.

Read more

Reading time: 4 minutes
June 3, 2026
Uso de dataclasses para simplificar classes em Python
Best Practices
Foto de perfil de Leandro Hirt da Academify

Python dataclasses: Build Cleaner Data Classes

Learn how Python dataclasses work: auto-generate __init__, __repr__, __eq__, use default values, field(), frozen=True, __post_init__, and asdict/astuple.

Read more

Reading time: 4 minutes
June 3, 2026
Entendendo como o GIL afeta performance em Python
Best Practices
Foto de perfil de Leandro Hirt da Academify

Python GIL: Threads, CPU, and Performance

Learn what Python's GIL is, why it exists, how it limits multithreading, and when to use multiprocessing to achieve true

Read more

Reading time: 6 minutes
June 3, 2026
Medição de tempo de execução de código Python com timeit
Best Practices
Foto de perfil de Leandro Hirt da Academify

Python timeit: Measure Code Performance

Learn how to measure Python code execution time with timeit: command line, setup parameter, function references, repeat(), and benchmarking best

Read more

Reading time: 4 minutes
May 30, 2026
Como resolver erros com variáveis de ambiente usando python-dotenv
Best Practices
Foto de perfil de Leandro Hirt da Academify

Fix .env Errors in Python with python-dotenv

Learn how to fix .env variable errors in Python using python-dotenv, load_dotenv, os.getenv, default values, find_dotenv, and API key security

Read more

Reading time: 4 minutes
May 29, 2026