This project is the python version of WeastCoastBot because my friends are picky and don't like nodejs
- 🔄 Migrated from Poetry to UV for faster dependency management
- 📈 Updated yfinance to latest version (0.2.65) for improved stock data
- 🐳 Updated Docker setup to use UV for consistent environments
- 🧹 Cleaned up build artifacts and improved .gitignore
- Docker
- UV (for local Python development)
- Create a
.env
file in/bot
by copying.env.example
and populating the variables with your values - Start up the app by running
docker compose up --build
- this will run db migrations and hot reload for any code changes
- Start coding!
This project uses UV for fast Python package management.
-
Install UV if you haven't already:
# macOS/Linux curl -LsSf https://astral.sh/uv/install.sh | sh # or with brew brew install uv
-
Install dependencies:
uv sync
-
Run the bot locally:
# Set up your database URL first export DATABASE_URL="sqlite:///local.db" # Run migrations uv run python manage.py migrate # Start the bot uv run python run_bot.py
-
Add new dependencies:
uv add package-name
-
Run tests or Django commands:
uv run python manage.py check uv run python manage.py shell
- in
/bot/cogs
copy the cog template atcog.py.example
and rename it to the command you'll be adding - Add a method that is named your command and annotate the method with
@commands.command()
- the parameters for this method will first be the discord context followed by command parameters
More info here - Discord Cogs
Docker issues: Try a fresh build with
docker compose down -v
docker compose up --build
UV issues: Reset the virtual environment
rm -rf .venv
uv sync
Python version issues: UV will automatically download the right Python version if needed