Prerequisites
Before you begin, make sure you have:- Python 3.9 or higher installed on your system
- Poetry for dependency management (recommended) or pip
We strongly recommend using Poetry for Python dependency management. If you don’t have it installed, visit poetry.eustace.io for installation instructions.
Step 1: Create a New Project
First, create a new directory for your project and navigate to it:Step 2: Initialize Your Project
Initialize a new Poetry project:Step 3: Install Tasteful
Add Tasteful as a dependency to your project:Step 4: Create Your First Flavor
Create the basic project structure:app/flavors/hello_flavor.py:
Step 5: Create Your Application
Now create your main application file inapp/main.py:
Step 6: Run Your Application
Start your development server:- http://127.0.0.1:8000/hello - Your custom greeting endpoint
- http://127.0.0.1:8000/hello/Alice - Personalized greeting
- http://127.0.0.1:8000/docs - Interactive API documentation
Step 7: Explore the API Documentation
Tasteful automatically generates interactive API documentation powered by FastAPI. Visit http://127.0.0.1:8000/docs to see your API endpoints and test them directly in the browser.What You’ve Built
Congratulations! You’ve created a Tasteful application with:- ✅ Modular architecture using Flavors
- ✅ Dependency injection with Services
- ✅ Automatic API documentation
Next Steps
Now that you have a working Tasteful application, you can:Learn About Architecture
Understand Tasteful’s modular design philosophy
Explore Flavors
Deep dive into creating powerful, reusable components
Add Authentication
Secure your application with authentication backends
Database Integration
Connect to databases using repositories and dependency injection
Troubleshooting
Common Issues
Port Already in Use- Change the port with:
uvicorn app.main:app --reload --port 8001
- Install Poetry from python-poetry.org
- Or use pip:
pip install tasteful(though Poetry is recommended)
Getting Help
- GitHub Issues: github.com/heka-ai/tasteful/issues
- Discussions: github.com/heka-ai/tasteful/discussions