Web development · 5 stages · about 48 weeks
Backend developer (Python: Django / FastAPI) roadmap
0/26 tasks done (ticks are kept on this device)
- 1
Beginner · about 8 weeks
Python basics and how the web works
What to learn
Python basics: Everything later is built on the language itself.
Learn variables, strings, numbers, if/else, loops and functions. Python uses indentation (spaces at the start of a line) to group code, so keep it neat. Write many tiny programs, like a bill calculator, before you touch any framework.
Lists, dictionaries and sets: Real data, like a list of orders or one customer, lives in these.
A list is an ordered collection, like daily sales. A dictionary stores values by a key, like a customer with name, phone and city. Learn list comprehensions, which build a new list in one short line.
Functions, modules and packages: Good code is split into small, reusable pieces.
A function does one job and can be tested on its own. A module is a .py file you can import, and a package is a folder of modules. pip installs packages made by others, such as requests.
Virtual environments: Each project needs its own set of packages and versions.
A virtual environment (venv) is a private folder of packages for one project, so projects do not break each other. Keep the list of packages in a requirements.txt or pyproject.toml file. Newer tools like uv do the same job very quickly.
Classes and objects: Django and most libraries are built with classes.
A class is a blueprint, like Product, and an object is one real item made from it, like "Tata Salt 1kg". Classes keep data and the functions that use it together. Learn __init__, methods and simple inheritance.
Files, errors and JSON: Programs read data, and things go wrong.
Learn to read and write text, CSV and JSON files. Use try/except to handle errors, for example when a file is missing, instead of letting the program crash. JSON is the format almost every web API uses.
HTTP and how the web works: A backend answers HTTP requests all day.
A request has a method (GET, POST, PUT, DELETE), a URL, headers and sometimes a body. The server sends back a status code like 200, 404 or 500, often with JSON. Use the requests library to call a public API and look at what comes back.
Git and the command line: Developers save their work with Git and run servers from a terminal.
Learn to move between folders, run Python scripts and read error messages in the terminal. Use Git to save versions of your code and push them to GitHub. Add a README to every project.
Tasks
Project
A command-line student marks manager: add students and marks, calculate totals, percentage and grade, save to a JSON file, and export a CSV report, with errors handled cleanly.
📘 Learn it here, free: Python Programming course
Free resources
- 2
Beginner · about 10 weeks
SQL and Django: your first real web app
What to learn
SQL and PostgreSQL: Most business data lives in SQL databases.
A SQL database keeps data in tables, like a strong spreadsheet. Learn SELECT, INSERT, UPDATE, DELETE, WHERE, JOIN and GROUP BY. Django works with SQLite for practice, but most jobs use PostgreSQL or MySQL.
Django project structure: Django gives you a complete, proven way to build web apps.
A Django project is split into apps, each with models, views, URLs and templates. Django follows a "batteries included" idea: login, admin, forms and security come built in. Many Indian companies and startups use Django for their main product.
Models and the Django ORM: Models describe your data and Django turns them into tables.
An ORM (object-relational mapper) lets you work with the database using Python instead of raw SQL. You write a Product model, and Django creates the table and lets you query it with Product.objects.filter(). Migrations are saved steps that change the table structure safely.
Views, URLs and templates: This is how Django turns a request into a page.
A URL pattern points to a view, which is a function or class that handles the request. The view gets data from models and passes it to a template, which is HTML with placeholders. Learn both function-based and class-based views.
Django admin: It gives you a ready-made back office for free.
Register your models and Django builds pages to add, edit and search records. Small businesses often run their whole day-to-day work from the admin. Learn to add search, filters and list columns.
Forms and validation: Sign-up, contact and order pages are all forms.
Django forms check the data, show errors next to the right field and protect against common attacks. ModelForms build a form straight from a model. Never trust data from the user without checking it.
Built-in authentication: Almost every app needs login and logout.
Django comes with users, password hashing, login, logout and password reset. Use the login_required decorator to protect pages. Learn the difference between authentication (who you are) and permissions (what you may do).
Tasks
Project
A tuition centre web app in Django: students, batches, fees in rupees and attendance, with login for staff, a clean admin, a monthly fee report and deployment on a free or low-cost host.
📘 Learn it here, free: Backend Development course
Free resources
- 3
Intermediate · about 10 weeks
APIs with Django REST Framework and FastAPI
What to learn
REST API design: Mobile apps and React frontends talk to the backend through APIs.
In REST, each thing has its own URL, like /api/products/7, and you use HTTP methods to read, create, change and delete it. Data goes back and forth as JSON. Use clear names, correct status codes and helpful error messages.
Django REST Framework (DRF): DRF is the standard way to build APIs on top of Django.
Serializers turn models into JSON and check incoming data. ViewSets and routers create list, detail, create, update and delete routes with little code. DRF also gives you permissions, paging and a browsable API page for testing.
FastAPI: FastAPI is popular for fast, modern APIs, especially around AI and data.
FastAPI uses Python type hints to check data and create API docs automatically. It supports async code, so one server can wait on many slow calls at once. Many AI products in India use FastAPI to serve machine learning models.
Pydantic: Pydantic checks that data has the right shape and types.
You describe your data as a class with typed fields, and Pydantic checks and converts incoming JSON. FastAPI uses it for every request and response. It is also handy for reading settings from environment variables.
SQLAlchemy and migrations: Outside Django, SQLAlchemy is the main way Python talks to databases.
SQLAlchemy is a powerful ORM and SQL toolkit used with FastAPI and many other projects. Alembic handles migrations, which are saved steps that change the database structure. Learn to look at the SQL it creates so you can spot slow queries.
Token authentication and JWT: Mobile apps and separate frontends need token-based login.
After login the server gives the app a token, which it sends with each request. A JWT (JSON Web Token) is a signed token that holds the user id and an expiry time. Keep tokens short-lived, and check permissions on every route.
OpenAPI docs: Other developers need to know how to use your API.
OpenAPI (Swagger) is a standard description of every route, input and output. FastAPI makes it for you at /docs, and DRF can with a package like drf-spectacular. Good docs save hours of questions from frontend and mobile teams.
Tasks
Project
A FastAPI backend for a UPI-style expense splitter: groups, members, expenses and "who owes whom" in rupees, with JWT login, PostgreSQL, Alembic migrations and full OpenAPI docs.
📘 Learn it here, free: Backend Development course
Free resources
- 4
Intermediate · about 8 weeks
Testing, background jobs, Docker and deployment
What to learn
Testing with pytest: Tests let you change code without breaking what already works.
pytest runs small test functions that use plain assert statements. Fixtures prepare things a test needs, like a test database or a logged-in user. Write tests for your rules (like fee totals) and for your API routes.
Celery and background jobs: Slow work like emails, PDFs and reports should not make the user wait.
Celery runs tasks in separate worker processes, using Redis or RabbitMQ as the message broker (the waiting list of jobs). Your view adds a task, such as "send fee receipt", and returns at once. Celery beat can also run tasks on a schedule, like a daily report at 9 pm.
Redis and caching: A cache makes repeated, slow work fast.
Redis is a very fast in-memory store. Django and FastAPI can cache slow query results or whole pages in it for a few minutes. Redis is also used for rate limiting and as the Celery broker.
Docker and Docker Compose: Docker makes your app run the same everywhere.
A Docker image packs your app with its Python version and packages. Docker Compose starts the web app, PostgreSQL, Redis and the Celery worker together. This is also how many companies run apps in production.
Running Python in production: The built-in development server is not safe or fast enough for real users.
Django runs behind Gunicorn (or an ASGI server like Uvicorn), usually with Nginx in front. FastAPI runs on Uvicorn. Learn to serve static files, set DEBUG off, use HTTPS and keep secrets in environment variables.
CI/CD with GitHub Actions: Automatic checks catch mistakes before they reach users.
Set up a workflow that installs packages, runs a linter like Ruff, and runs pytest on every pull request. Deploy automatically when the main branch passes. This is a normal part of most backend jobs.
Tasks
Project
A small clinic appointment system: Django or FastAPI API, patient and doctor roles, SMS or email reminders sent by Celery, a daily report, pytest tests in CI, and a docker-compose setup deployed online.
📘 Learn it here, free: Backend Development course
Free resources
- 5
Expert · about 12 weeks
Scale, security and system design
What to learn
Database performance: Slow queries are the most common reason a Python backend feels slow.
Use EXPLAIN to see how PostgreSQL runs a query, and add indexes where they help. In Django, use select_related and prefetch_related to avoid the "N+1" problem of many small queries. Use transactions so related changes are saved together or not at all.
Async Python: Async code lets one server handle many slow network calls at once.
asyncio lets a program start a task, wait for it without blocking, and do other work meanwhile. FastAPI and newer Django versions support async views. Async helps with waiting on networks, not with heavy CPU work.
System design basics: Senior roles ask you to design whole systems, not just one API.
Learn load balancers, several app servers, read copies of the database, caches, queues and file storage. Practise designing something like an exam results site that gets a huge rush on result day. Explain the trade-offs of each choice.
Security: Backends hold the data that attackers want.
Study the OWASP Top 10, such as injection, broken access control and leaked secrets. Django protects against many attacks by default, but only if you do not switch the protections off. Keep packages updated and check them with a tool like pip-audit.
Observability: In production you need to see errors and slow spots quickly.
Collect structured logs, metrics and traces, often with OpenTelemetry. Error tracking tools show the exact line where a crash happened. Set alerts for high error rates and slow responses.
Serving AI and data features: Many Python backend jobs now involve AI or data products.
Learn to call AI model APIs safely, with timeouts, retries and cost limits. Long AI or data jobs belong in background workers, not inside a web request. Store prompts, results and errors so you can check quality later.
Leading backend work: Senior engineers make decisions that the whole team lives with.
Write short design notes before large changes and invite feedback. Review code kindly and explain the why. Keep clear runbooks for common problems, so anyone on the team can fix them.
Tasks
Project
A production-style system such as a GST invoice service for small shops: API, PDF invoices made by Celery workers, PostgreSQL with transactions, Redis cache, load testing, traces and alerts, and a design document that explains every choice.
Free resources