Hackathon with MHL and digital ocean 12 12 2025
- Python (using 3.13)
- Git
git clone https://github.com/cli620/tree-huggers.git
cd tree-huggersuv is a fast Python package manager. Install it using one of the following methods: Alternative (using pip):
pip install uvInstall all project dependencies using uv:
uv syncThis will read your pyproject.toml and install all required packages.
Create a .env file in the root directory of the project:
cp .env.example .envThen edit .env and add your configuration:
GRADIENT_AGENT_ACCESS_KEY = ...
GRADIENT_AGENT_ENDPOINT = ...
GRADIENT_MODEL_ACCESS_KEY = ...Important: Never commit your .env file to version control. It's already included in .gitignore.
uv run uvicorn app.main:app --reloadThe --reload flag enables auto-reloading during development.
Once the server is running, you can access:
- API: http://localhost:8000
- API Documentation: http://localhost:8000/docs (Swagger UI)
- Alternative Docs: http://localhost:8000/redoc
If dependencies have changed:
uv syncuv add package-nameuv run pytest # Run tests
uv run ruff check . # Run linting
uv run black . # Format code.
├── app/
│ ├── main.py # Application entry point
│ ├── api/ # API routes
│ ├── models/ # Database models
│ └── utils/ # Utility functions
├── tests/ # Test files
├── .env # Environment variables (not in git)
├── .env.example # Example environment file
├── pyproject.toml # Project dependencies
└── README.md # This file
If port 8000 is already in use, specify a different port:
uv run uvicorn app.main:app --reload --port 8001If you get errors about missing environment variables, ensure your .env file is properly configured with all required values.
If you encounter dependency conflicts:
uv sync --reinstall