How davidmbk/steam-trading-cards works
Project Type & Purpose
• This is a stand-alone, open-source CLI application written in Python 3.11.
• It queries the Steam Web API for trading-card set prices and user drop-rate statistics, processes and persists data (Excel, PDF), and presents results via the terminal.
Core Architectural Components
a. User Interface (CLI)
• main.py: entry point that bootstraps the tool
• source_code/Interface.py: handles prompts, menus, and user input
b. Authentication & Configuration
• source_code/Auth.py: manages Steam API key, optional proxy/VPN settings, rate-limit compliance
c. Data Retrieval (Steam Web API)
• HTTP client (requests library)
• Routes for fetching game lists, card set prices, badge links, and user stats
d. Data Processing & Business Logic
• source_code/User_data.py: computes level-up costs, cooldown formulas, drop rates
• source_code/database_operation.py: transforms raw JSON into tabular data
e. Persistence & Output
• Excel database generation (pandas/openpyxl)
• PDF/pie-chart creation (matplotlib)
• images/ folder for storing static assets or generated charts
f. External Services
Relationships & Data Flows
1) User invokes CLI → 2) Interface module → 3) Auth module (validate settings) →
4) Data Retrieval module (Steam API calls) → 5) Business Logic modules (User_data + database_operation) →
6) Persistence (Excel, PDF) → 7) Interface displays summaries and file locations back to user.
Architectural Patterns & Design Principles
• Separation of Concerns: UI, Auth, Data Retrieval, Processing, and Persistence are distinct modules.
• Modular/Layered: each layer depends only on the one below it.
Relevant Technologies & Libraries
• Python 3.11
• requests (HTTP client)
• pandas, openpyxl (Excel)
• matplotlib (PDF charts)
• rate-limiting via time.sleep or third-party library (as needed)