Prerequisites
Before installing Platzi Viewer, ensure you have:- Python 3.7+ installed on your system
- pip (Python package manager)
- Git (for cloning the repository)
- A Google Cloud service account with Drive API access (see Google Drive Setup)
- A shared Google Drive folder containing Platzi course content
Installation Methods
Core Dependencies
The application requires the following Python packages:| Package | Version | Purpose |
|---|---|---|
requests | 2.31.0 | HTTP requests |
google-api-python-client | 2.108.0 | Google Drive API client |
google-auth | 2.23.0 | Google authentication |
google-auth-oauthlib | 1.1.0 | OAuth for Google APIs |
google-auth-httplib2 | 0.1.1 | HTTP transport for Google Auth |
The
requirements.txt file includes optional development dependencies like pytest, black, flake8, and pyinstaller. These are not required for running the application.Environment Configuration
Create a.env file in the project root to configure the application (optional):
.env
Environment Variables Reference
PORT: HTTP server port (default:8080)HOST: Bind address (default:127.0.0.1, use0.0.0.0for Docker/network access)PUBLIC_HOST: Host displayed in logs (default: same asHOST)GOOGLE_SERVICE_ACCOUNT_FILE: Path to service account JSON fileGOOGLE_SERVICE_ACCOUNT_JSON: Alternative to file path - full JSON credentials as stringPLATZI_VIEWER_PATH: Project root directory (default: current directory)PLATZI_DATA_PATH: Data storage directory (default: same asPLATZI_VIEWER_PATH)MAX_PROGRESS_BYTES: Maximum size for progress.json (default: 2MB)
Service Account Setup
Place your Google Cloud service account JSON file in the project root:GOOGLE_SERVICE_ACCOUNT_JSONenvironment variable (inline JSON)GOOGLE_SERVICE_ACCOUNT_FILEenvironment variable (file path)service_account.jsonin the executable directory (for PyInstaller builds)service_account.jsonin the current working directoryservice_account.jsonin the script directory
See Google Drive Setup for instructions on creating a service account and configuring Drive API access.
Verification
Verify your installation by checking the Python version and imports:Docker Installation Details
When using Docker, the application runs in a containerized environment:docker-compose.yml
- Python 3.13-slim base image
- Health checks every 30 seconds via
/api/health - Volume mounts for persistent data (
runtime-data/) and read-only secrets (secrets/) - Auto-restart policy (
unless-stopped)
Building Windows Executable (Optional)
For Windows users, you can create a portable executable:dist/PlatziViewer/PlatziViewer.exe with all dependencies bundled.
The build script automatically includes
service_account.json if it exists in the project root. For distribution, you may want to exclude this file and have users provide their own credentials.Next Steps
Configure Google Drive
Set up your Google Cloud project and service account to access the Drive API.Go to Google Drive Setup →
Build the Cache
Scan your Google Drive folder structure to generate the courses cache.Go to Building Cache →
Start the Application
Follow the complete quickstart guide to launch Platzi Viewer.Go to Quickstart →