GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ashleymavericks/browser-hot-reloading: Browser hot-reloading for Python ASGI web frameworks like FastAPI using arel

BranchesTags
Open more actions menu

Latest commit

 

History

7 Commits
7 Commits

Folders and files

NameName
Last commit message
Last commit date
templates
templates
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
Pipfile
Pipfile
 
 
Pipfile.lock
Pipfile.lock
 
 
README.md
README.md
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Browser Hot-Reloading in FastAPI using arel

License: MIT Python Versions

🌟 Overview

Browser hot-reloading is a crucial development technique that automatically refreshes your web application when source files change, providing a seamless and efficient development experience for Python ASGI web frameworks like FastAPI.

📖 What is arel?

arel is a lightweight library designed to implement development-only hot-reloading for non-Python files that are not dynamically read from disk on each request. This includes:

  • HTML templates
  • GraphQL schemas
  • Cached rendered Markdown content
  • Static assets

Key Features

  • Real-time file change detection
  • WebSocket-based browser notifications
  • Customizable reload hooks
  • Minimal performance overhead

🔧 How Does arel Work?

  1. File Watching: arel monitors specified files for changes
  2. WebSocket Notification: When a file is modified, it sends a signal to the browser
  3. Automatic Reload: An injected client script triggers a page refresh
  4. Custom Hooks: Developers can register additional server-side reload operations

🚀 Quick Start

Prerequisites

  • Python 3.8+
  • FastAPI
  • uvicorn

Installation

# Clone the repository
git clone https://github.com/ashleymavericks/browser-hot-reloading.git

# Install dependencies
pipenv install  # or pip install -r requirements.txt

Running the Application

# Start the FastAPI application with hot-reloading
DEBUG=true uvicorn main:app --reload

🧠 Deep Dive: How It Works

For an in-depth explanation of browser hot-reloading and the implementation details, check out the comprehensive blog post:

Supercharge Your FastAPI Development with Browser Hot Reloading Using Arel

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

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

About

Browser hot-reloading for Python ASGI web frameworks like FastAPI using arel

Topics

arelasgi-frameworkbrowser-reloadfastapihot-reloadingpython

Resources

Readme
MIT license
Activity

Stars

5 stars

Watchers

2 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.