Hello World in Python
Create your first WendyOS application using Python
Creating Your First Python Application
This guide will walk you through creating a simple "Hello, World!" application for WendyOS using Python. This is a great way to prove that you can send your first app to your device and verify your development environment is set up correctly.
Prerequisites
- Wendy CLI installed on your development machine
- Python 3.14 installed
- Docker installed (see Docker Installation)
- A WendyOS device plugged in over USB or connectable over Wi-Fi
Creating the Project
Create the Application
Create an app.py file with the following content:
#!/usr/bin/env python3
if __name__ == '__main__':
print("Hello World")This is the entry point for your WendyOS application. The if __name__ == '__main__' guard ensures it only runs when executed directly.
Create requirements.txt
Create a requirements.txt file. For this simple example, we don't need any dependencies:
# No dependencies requiredCreate a Dockerfile
Create a Dockerfile in the root of your project:
# Use uv with Python 3.14 (slim variant for better compatibility with Debian-based systems like NVIDIA Jetson Orin Nano)
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
# Set working directory
WORKDIR /app
# Copy application code
COPY app.py .
# Create a non-root user for security
RUN useradd --create-home --shell /bin/bash app && \
chown -R app:app /app
USER app
# Run the application
CMD ["python", "app.py"]Deploy to WendyOS Device
Deploy your application to a connected WendyOS device:
wendy runThis will build your application into a container and deploy it to your device.
Verifying Deployment on Your Device
After deploying your application to a WendyOS device, you can verify it was successfully deployed and ran by listing the applications on your device:
wendy device apps list
✔︎ Searching for WendyOS devices [5.3s]
✔︎ Listing applications: True Probe [USB, Ethernet, LAN]
╭───────────────┬─────────┬─────────┬──────────╮
│ App │ Version │ State │ Failures │
├───────────────┼─────────┼─────────┼──────────┤
│ hello-world │ 0.0.1 │ Stopped │ 0 │
╰───────────────┴─────────┴─────────┴──────────╯Expected State: The app shows as "Stopped" because a hello-world application exits immediately after printing its message. This is expected behavior. The key indicator of success is the "Failures" column showing 0, which confirms your application ran and exited successfully without any errors.
Next Steps
Now that you have a basic Python application running:
- Learn how to build a Simple Web Server with FastAPI
- Explore WendyOS libraries for hardware access
- Build more complex applications with user input and data processing