Sven's Guestbook

A simple, real-time guestbook application built with:

  • FastHTML: A Python framework for building HTML applications
  • HTMX: For seamless AJAX requests and updates

👋 Say hi: https://guestbook.pythonandvba.com

This project uses Google Sheets as the "database". I also created the same project with a supabase. You can check it out here: https://github.com/Sven-Bo/fasthtml-guestbook-supabase

Website Demo

Inspiration

This project was inspired by Matt's Guestbook. Thanks, Matt! 🙏

Setup

Prerequisites

To set up the guestbook, you'll need:

  • Python 3.x installed on your system.
  • Google Sheets API and Google Drive API enabled on your Google account.
  • Credentials JSON File: A credentials.json file is required to authenticate with the Google Sheets API. If you haven't set this up yet, a quick tutorial will be provided to guide you through the process.

Installation

  1. Clone the Repository:

    git clone https://github.com/Sven-Bo/fasthtml-guestbook.git
    cd yourrepository
  2. Install Dependencies:

    Install the required Python packages using pip:

    pip install -r requirements.txt
  3. Set Up Google Sheets API:

    • Enable the Google Sheets API and Google Drive API in your Google Cloud Console.
    • Download the credentials.json file and place it in the root directory of your project.
    • Share your Google Sheets document with the email address listed in the credentials.json file.
  4. Run the Application:

    Start the server by running:

    python main.py

    Visit http://localhost:5001 in your browser to see the guestbook in action.

Deployment

You can deploy this guestbook application using your preferred hosting service. Follow the steps in the FastHTML documentation to learn how to deploy your application.

🤝 Connect with Me

Support

If you appreciate the project and wish to encourage its continued development, consider supporting my work. ko-fi

Feedback & Collaboration

For feedback, suggestions, or potential collaboration opportunities, reach out at contact@pythonandvba.com. Logo