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 - marty331/fasthtmx: FastAPI-HTMX Demo Project

BranchesTags
Open more actions menu

Latest commit

 

History

17 Commits
17 Commits

Folders and files

NameName
Last commit message
Last commit date
db
db
 
 
models
models
 
 
schema
schema
 
 
services
services
 
 
static
static
 
 
templates
templates
 
 
viewmodels
viewmodels
 
 
.dockerignore
.dockerignore
 
 
.gitignore
.gitignore
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
__init__.py
__init__.py
 
 
main.py
main.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Fast-HTMX

Description

Fast-HTMX is a demo project of FastAPI and HTMX. The purpose of this project is to illustrate how to create a website with no JavaScript, using only HTML, CSS, and Python. HTMX is a plugin that allows this to be possible.

HTMX Attributes

The following HTMX attributes are used in this project:

  • hx-get
  • hx-post
  • hx-trigger
  • hx-target
  • hx-push-url
  • hx-indicator
  • hx-swap

Structure

db - Database setup

models - Data models

schema - Pydantic models

services - Database services

static - Static files

templates - Contains files for each page and partials for all partial pages that are related to the main page of the directory which it is under.

viewmodels - View models for gathering data for pages and partials.

main.py - Main operational file for running FastAPI.

How to run

  • Create virtual environment
  • Activate virtual environment
  • Install requirements pip3 install -r requirements.txt
  • Run project python3 -m uvicorn main:app --reload

    Using Docker

    • Build image docker build -t fast-htmx .
    • Create Database touch sql_app.db
    • Run container docker run -v $(pwd)/sql_app.db:/code/sql_app.db -d --name fast-htmx -p 8000:8000 fast-htmx

About

FastAPI-HTMX Demo Project

Topics

fastapihactoberfesthactoberfest-2021hactoberfest2021htmxprs-welcome

Resources

Readme
Activity

Stars

273 stars

Watchers

4 watching

Forks

35 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.