Skip to content

Just2Deep/recipe_api

Repository files navigation

🍳 SmileCook Recipe API

License Python FastAPI Status

A modern, RESTful API for managing and sharing recipes. Built with FastAPI and designed for scalability and ease of use.

FeaturesInstallationAPI DocumentationContributingLicense

✨ Features

  • 🔍 Recipe Management

    • Get all recipes with pagination and filtering
    • Search recipes by name, ingredients, or tags
    • Get detailed recipe information
    • Add new recipes with validation
    • Update existing recipes
    • Delete recipes
  • 🛠️ Technical Features

    • RESTful API design
    • JSON response format
    • Input validation
    • Error handling
    • Rate limiting
    • CORS support
    • Swagger/OpenAPI documentation

🚀 Installation

  1. Clone the repository

    git clone https://github.com/Just2Deep/recipe_api.git
  2. Navigate to the project directory

    cd recipe_api/smilecook
  3. Set up virtual environment

    # Create virtual environment
    python -m venv venv
    
    # Activate virtual environment
    # On Windows
    venv\Scripts\activate
    # On Unix or MacOS
    source venv/bin/activate
  4. Install dependencies

    pip install -r requirements.txt
  5. Run the application

    python main.py

The API will be available at http://localhost:8000

📚 API Documentation

For detailed API documentation, visit our API Documentation

Example API Usage

import requests

# Get all recipes
response = requests.get('http://localhost:8000/api/recipes')

# Get a specific recipe
response = requests.get('http://localhost:8000/api/recipes/1')

# Add a new recipe
new_recipe = {
    "name": "Chocolate Cake",
    "ingredients": ["flour", "sugar", "cocoa powder"],
    "instructions": "Mix ingredients and bake"
}
response = requests.post('http://localhost:8000/api/recipes', json=new_recipe)

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Commit your changes (git commit -m 'Add amazing feature')
  5. Push to the branch (git push origin feature/amazing-feature)
  6. Open a Pull Request

Development Setup

# Install development dependencies
pip install -r requirements-dev.txt

# Run tests
pytest

# Run linting
flake8

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

📞 Support

If you encounter any issues or have questions, please:

  • Open an issue in the GitHub repository
  • Contact the maintainers

Made with ❤️ by Deep

About

Full fledged recipe sharing API using Flask RESTful

Topics

Resources

License

Stars

Watchers

Forks