Pandora ResearchPandora
Research
RUEN
Blog

Articles & notes

We write about development, artificial intelligence and what inspires us. Sharing the experience of the Pandora Research team.

Backend
Featured

Connecting S3 storage to a Django project

A step-by-step guide to serving static and media files through an S3-compatible Yandex.Cloud bucket in Django using django-storages and boto3.

July 16, 20265 min read
Read article
Python

AsyncIO in Python

We break down the architecture of the asyncio event loop, its main elements, and write a simple asynchronous Python program, accounting for the changes in version 3.11.

July 14, 20264 min read
DevOps

A Dockerfile for a Django project

A worked example of writing a Dockerfile for a Django project: choosing a base image, installing dependencies, serving static files with nginx and a startup script with gunicorn.

July 11, 20266 min read
Python

The GIL: Python's Global Interpreter Lock

We explain what the GIL (Global Interpreter Lock) is, how reference counting in Python relates to the global lock, and when threads still make sense.

July 9, 20265 min read
DevOps

Git: version-control basics

A concise cheat sheet for the core Git commands: initializing and configuring a repository, working with the index, commits and rolling back changes — with example commands and output.

July 7, 20265 min read
Python

Context managers and the with statement

A look at why context managers and the with statement exist in Python and how to build your own — both class-based with __enter__/__exit__ methods and generator-based with the contextmanager decorator.

July 3, 20266 min read
Python

Generators in Python

We explore what generators are in Python, how the yield keyword works, how a generator differs from an iterator, and where generators are useful — from infinite sequences to reading large files.

June 30, 20267 min read
Python

Decorators in Python

A guide to decorators in Python: higher-order functions and closures as their foundation, the @ syntactic sugar, passing arguments via *args and **kwargs, and a universal decorator template.

June 26, 20268 min read
Python

Iterators in Python

A hands-on look at how iterators work in Python: we build a range clone with __iter__ and __next__, see how the for loop works under the hood, and meet the built-in enumerate, zip and open iterators.

June 22, 20266 min read
Python

Coroutines in Python

A look at coroutines in Python: how they build on generators, the yield expression and the send method, a decorator for priming them, and the advantages and drawbacks of the asynchronous approach.

June 18, 20267 min read