Skip to main content

Project overview and FastAPI basics

In this hands-on course, you'll build a complete movie recommendation API that demonstrates how to integrate Weaviate into a back-end application with FastAPI, a popular Python web framework.

What you'll build

You'll build a functioning movie discovery API, featuring:

  • Movie search based on user query, with option year ranges
  • Movie details page including list of similar movies
  • Genre-based exploration to find movies by genres
  • Movie recommendations based on viewing occasions

When you are finished, you will have a fully functional movie discovery API, similar to that shown here:

A preview of the completed API

About FastAPI

This course uses FastAPI, a modern Python web framework for building APIs. For our course, FastAPI is a great choice as it provides:

  • Automatic, interactive API documentation
  • Request/response validation

If you're new to FastAPI, don't worry. The FastAPI application structure is pre-built for you in this course, so you can focus on implementing the Weaviate operations. You are not expected to write any FastAPI-specific code from scratch.

Your API endpoints

You'll implement five endpoints that showcase different Weaviate capabilities:

/info - Dataset information

Returns basic statistics about your movie collection and sample movies.

Weaviate concepts: Counting collection size, fetching objects

Explore endpoint example

Performs hybrid search with optional year filtering and pagination.

Weaviate concepts: Hybrid search, filtering, pagination

Search endpoint example

/movie/{movie_id} - Movie details

Retrieves movie information and finds similar movies using vector similarity (near_object).

Weaviate concepts: Filtering, vector (near-object) search

Movie details endpoint example

/explore - Genre discovery

Discovers movies by similarity (near_text) to provided genres with popularity-based ranking.

Weaviate concepts: Vector (near text) search, post-processing results

Explore endpoint example

/recommend - AI recommendations

Uses RAG to recommend movies based on viewing occasions.

Weaviate concepts: Retrieval-augmented generation, Vector (near text) search

Recommend endpoint example

Learning focus

This course focuses on the Weaviate integration aspects. The FastAPI application structure, request handling, and response models are provided so you can concentrate on learning vector database operations.

You'll progress from simple operations to sophisticated AI-powered features, building practical experience with the patterns you'll use in real applications.

What's next?

Now that you understand what you'll be building, let's set up your development environment and get the project ready for implementation.

Login to track your progress