RANIARANIA Academy

AI-Assisted Python Development III — Building AI-Powered Apps

Build real, AI-powered Python applications by calling LLM APIs the right way — keys from environment variables, reusable prompt templates, structured JSON output, a chatbot loop, and an AI feature inside a Flask app. You will also make your app robust and safe with retries, prompt-injection guards, and token and cost logging. This is a practical, hands-on course that assumes you can already write intermediate Python.

Watch the free preview

Your first LLM API call — and keeping secrets safe — free to watch, no account needed.

Python: Professional ADVANCED · 150 min · Certificate on completion · 3 CPD points

What you'll learn

  • Call an LLM API from Python with an openai-style client and keys loaded from environment variables
  • Build reusable prompt-template functions and request structured JSON output your program can parse
  • Implement a chatbot loop that maintains conversation state and a keyword retrieval step before the prompt
  • Add an AI-powered summariser feature to a Flask application
  • Guard against prompt injection, handle API errors with retries, and log token usage and cost

Syllabus

Calling LLM APIs from Python
Your first LLM API call — and keeping secrets safeFree preview15 min
Prompt templates — reusable, parameterised prompts15 min
Structured Output and Conversations
Structured JSON output your program can parse15 min
A simple chatbot loop with memory15 min
Retrieval and Flask Integration
Tiny retrieval before the prompt15 min
Adding an AI feature to a Flask app15 min
Robust and Safe AI Apps
Errors, retries and rate limits15 min
Prompt-injection guarding and logging tokens and cost15 min
Lab — 10 Programming Exercises & Solutions
Programming Exercises 1–515 min
Programming Exercises 6–1015 min