A Developer's Journey: Making Python and Go Talk, with an Analyzing Mind
Everyone who wants to become a developer makes a weather app — but what I wanted to do here is make Python and Go talk, and have an analyzing mind. This project represents my journey from a simple weather app to a sophisticated intelligence system, where I learned to make two different languages communicate seamlessly.
I was successful in my ambitious goal, and this project showcases my growth as a developer. I have always quit writing code when I needed to design GUIs, so I decided to build everything in the terminal — a choice that focused my attention on the core logic rather than flashy interfaces.
Along the way, I learned:
- How to make Python and Go communicate through JSON files and subprocess calls
- Advanced JSON handling — saving data in JSON format, parsing it, and defining structures in different languages
- Better use of Go routines for concurrent weather data collection
- Data persistence and intelligent caching systems using JSON files
- Internationalization by handling Unicode location names (Cyrillic, Chinese, etc.)
- System architecture design with microservices approach
- Real-world API integration with proper error handling and rate limiting
I'm aware the idea of Go and Python together is actually complicated, but it was on purpose. I wanted to make them talk, and I did. Working with JSON for all data exchange made me realize there are more sophisticated storage solutions like MongoDB that I may explore in the future.
Check out the system in action:
Weather Intelligence System main interface with natural language queries
System architecture showing Python-Go communication flow
The system is designed as a hybrid application combining Python's data science capabilities with Go's performance for real-time weather analysis and pattern recognition.
[Weather APIs] ──┐
├──→ [Go Data Collector] ⇄ [JSON Files] ⇄ [Python Core] → [Go Pattern Engine]
[Local Sensors] ─┘ (Concurrent) (CS50) (Analysis)
Or in a more detailed form:
┌─────────────────┐ ┌──────────────┐ ┌─────────────┐
┌─────────────┐ │ Go Data │ │ Integration │ │ Python │
│ Weather │────→│ Collector │────→│ Files │←───│ Core │
│ APIs │ │ (Concurrent │ │ (JSON) │ │ (CS50 │
│ (met.no, │ │ Processing) │ │ │ │ Project) │
└─────────────┘ └─────────────────┘ └──────────────┘ └─────────────┘
│
▼
┌──────────────┐
│ Go Pattern │
│ Engine │
│ (Analysis) │
└──────────────┘
The two-way arrows (⇄) between Go Data Collector, JSON Files, and Python Core illustrate the bidirectional communication that enables Python and Go to talk seamlessly.
- Dynamic Location Lookup: Supports any city worldwide via geocoding
- Natural Language Input: Accept queries like "What's the weather in Paris?"
- Location Detection: Optional automatic location detection via IP geolocation
- Smart Caching: Multi-layer caching system (location coordinates, weather data, historical analysis)
- Concurrent Processing: Go routines for collecting weather data from multiple locations simultaneously
- Intelligent Analysis: Pattern recognition and anomaly detection for weather data
- Terminal User Interface: Clean, efficient interface without GUI complexity
- Cross-Language Integration: Seamless communication between Python and Go services
The Weather Intelligence System offers multiple installation methods to suit different needs and preferences:
- 🐳 Container Installation: Perfect for users who want the simplest experience with no setup complexity
- 🖥️ System Installation: Ideal for developers who want to modify code or prefer native installations
The easiest way to run Weather Intelligence System on any platform.
# Download and run (automatically detects Podman or Docker)
curl -fsSL https://raw.githubusercontent.com/redsskull/weather-intelligence-system/main/run-weather.sh | bash
# Or download first, then run with persistent data
curl -O https://raw.githubusercontent.com/redsskull/weather-intelligence-system/main/run-weather.sh
chmod +x run-weather.sh
./run-weather.sh --save-dataWith Podman:
podman run -it --rm ghcr.io/redsskull/weather-intelligence-system
# With persistent data storage
podman run -it --rm -v weather-data:/app/data ghcr.io/redsskull/weather-intelligence-systemWith Docker:
docker run -it --rm ghcr.io/redsskull/weather-intelligence-system
# With persistent data storage
docker run -it --rm -v weather-data:/app/data ghcr.io/redsskull/weather-intelligence-system- ✅ Works everywhere: Linux, macOS, Windows, cloud servers, Raspberry Pi
- ✅ No dependencies: No Python, Go, or build tools needed
- ✅ One command: Just run and go
- ✅ Always consistent: Same behavior on all systems
- ✅ Completely isolated: No conflicts with your system
For developers who want to modify the code or prefer native installation.
Prerequisites: Before installing, ensure you have Python 3.x, Go, and Git installed on your system.
On Linux/macOS using curl:
curl -fsSL https://raw.githubusercontent.com/redsskull/weather-intelligence-system/main/install.sh | bashOn Linux/macOS using wget:
wget -qO- https://raw.githubusercontent.com/redsskull/weather-intelligence-system/main/install.sh | bashOn Windows using PowerShell:
iex (iwr https://raw.githubusercontent.com/redsskull/weather-intelligence-system/main/install.ps1 -UseBasicParsing)- Clone the repository:
git clone https://github.com/redsskull/weather-intelligence-system.git
cd weather-intelligence-system- Set up a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows, use: venv\\Scripts\\activate
pip install --upgrade pip
pip install -r requirements.txt- Install Go dependencies and build Go components:
cd go-components/data-collector && go build -o ../../data-collector && cd ../..
cd go-components/pattern-engine && go build -o ../../pattern-engine && cd ../..- Run the project:
python project.pyOur installation script includes several safety measures to protect your system:
-
No Root Privileges Required: The installer does not require sudo and installs only to user-writable directories.
-
Safe Directory Selection: The installer checks for user-writable directories first (
~/.local/bin,~/bin) before creating any directories. -
Isolated Installation: All application files are installed to
~/.local/share/weather-intelligence-system, keeping them separate from system files. -
PATH Modification Only to User Directories: The installer only adds entries to your PATH that point to directories in your home folder.
-
Prerequisite Checks: The installer verifies that Python, Go, and Git are installed before proceeding.
-
Virtual Environment Isolation: Python dependencies are installed in a dedicated virtual environment to avoid system-wide package conflicts.
-
Cleanup on Failure: If the installation fails, temporary files are cleaned up automatically.
Before running the system installation script, you must have the following tools installed on your system:
- Python 3.x (with pip)
- Go (latest stable version)
- Git (for downloading and building Go components)
The installation script will check for these prerequisites and exit with an error message if any are missing.
- On Linux/macOS:
- A Unix-like operating system (Linux/macOS)
- On Windows:
- PowerShell 5.1 or later
On Linux/macOS:
- Creates the installation directory at
~/.weather-intelcontaining all application files - Downloads the source code, builds the Go components (requires Git), and stores the compiled binaries in the installation directory
- Creates and sets up a Python virtual environment (venv) for isolated dependencies
- Installs the
weatherandweather-uninstallcommands to~/.local/bin - The
weathercommand runs the application from within the virtual environment
On Windows:
- Creates the installation directory at
$env:USERPROFILE\\.weather-intelcontaining all application files - Downloads the source code, builds the Go components (requires Git), and stores the compiled binaries in the installation directory
- Creates and sets up a Python virtual environment (venv) for isolated dependencies
- Installs the
weathercommand script to$env:USERPROFILE\\.local\\bin - Automatically adds the installation directory to your user PATH environment variable
On Linux/macOS: After installation, you may need to restart your terminal or run the appropriate source command for your shell to update your PATH:
- For bash users:
source ~/.bashrcorsource ~/.bash_profile - For zsh users (default on macOS):
source ~/.zshrcorsource ~/.zprofile- On macOS, it's often
.zprofilethat exports PATH variables
- On macOS, it's often
- Or simply restart your terminal
The complete Weather Intelligence System is installed in a dedicated directory:
- On Linux/macOS:
~/.weather-intel - On Windows:
$env:USERPROFILE\\.weather-intel
This directory contains:
- All Python source files (project.py, requirements.txt, utils/, etc.)
- Compiled Go binaries (data-collector, pattern-engine)
- A dedicated Python virtual environment with all dependencies
- Data cache and integration directories
The system is completely self-contained in this directory and doesn't modify any system-wide directories.
On Windows:
The installer automatically updates your user PATH environment variable. You may need to restart your PowerShell session to use the weather command directly.
Then you can run:
weatherOn Linux/macOS: You can uninstall using the uninstall command:
weather-uninstallOr manually remove:
- The installation directory:
~/.weather-intel - The installed binary:
~/.local/bin/weather - The uninstall binary:
~/.local/bin/weather-uninstall
On Windows: You can uninstall using the uninstall command:
weather-uninstallOr manually remove:
- The installation directory:
$env:USERPROFILE\\.weather-intel - The installed scripts:
$env:USERPROFILE\\.local\\bin\\weather.ps1and$env:USERPROFILE\\.local\\bin\\weather-uninstall.ps1 - The PATH entry from your user environment variables
{
"location": {
"latitude": 59.9139,
"longitude": 10.7522,
"name": "Oslo, Norway"
},
"timestamp": "2025-09-26T15:00:00Z",
"current": {
"temperature": 16.0,
"pressure": 1020.8,
"humidity": 56.8,
"wind_speed": 3.7,
"wind_direction": 93.1,
"cloud_cover": 100.0,
"conditions": "cloudy"
},
"forecast": {
"next_1h": {
"precipitation": 0.0,
"symbol": "cloudy"
},
"next_6h": {
"precipitation": 0.1,
"symbol": "partly_cloudy"
}
}
}func FetchConcurrently(urls []string) <-chan WeatherResponse {
responses := make(chan WeatherResponse, len(urls))
for _, url := range urls {
go func(u string) {
resp, err := http.Get(u)
responses <- WeatherResponse{Response: resp, Error: err}
}(url)
}
return responses
}I'm not here to make things pretty (as a matter of fact, I'm terrible at it. If anyone wants to make a GUI for this be my guest) - I'm here to make them think. My passion lies deep in the brain of systems, not in their surface appearance. I want to understand how minds work - both human and machine. I build the engines, not the paint jobs. This project is a perfect example of focusing on the intelligence and functionality rather than visual aesthetics.
- Go - 🧠 The Nervous System (fast, concurrent, reliable)
- Python - 🤖 The Learning Center (AI, patterns, decisions)
- JSON - 🔄 The Communication Protocol (data exchange format)
- Bash - 🔧 The Body (real-world interfaces)
This project is more than just a weather app — it's a demonstration of my ability to tackle complex challenges, integrate multiple technologies, and build intelligent systems. It represents my growth from someone who would quit at GUI development to someone who can architect sophisticated distributed systems that make different languages talk to each other.
The skills I developed through this project - concurrent programming, cross-language integration, JSON data manipulation, system architecture, and intelligent caching - form the foundation for my journey toward building truly intelligent systems that don't just compute, but think, feel, and surprise us with their own intelligence.
I welcome contributions that enhance the intelligence of this system. Whether it's improving the pattern recognition algorithms, adding new weather APIs, or creating more sophisticated Go services, every enhancement brings us closer to truly intelligent weather analysis.
- Special thanks to ForrestKnight for the original idea, which you can see in this video: https://www.youtube.com/watch?v=zX4u3SudI-0
- Thanks to Qwen for teaching me things when I didn't know them and helping me understand complex concepts
This project reflects my journey as a developer and is shared with the community to inspire others to tackle complex challenges and integrate different technologies in innovative ways.
