Coder Social home page Coder Social logo

fasttools's Introduction


Fasttools

a set of python funktions and classes for web development

Please note: this library is currently in early alpha and is NOT ready for production use.

๐Ÿ“ฆ Installation


fasttools is available on PyPI and can be installed with pip:

pip install fasttools

Project folder structure

project_folder_struktur/
โ”‚
โ”œโ”€โ”€ client/
โ”‚   โ”œโ”€โ”€ 
โ”œโ”€โ”€ .venv
โ”œโ”€โ”€ main.py
โ”œโ”€โ”€ build.py

Usage

main.py

from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from pathlib import Path
import uvicorn
from fasttools_ import frontend,shutdown, serve_development
from contextlib import asynccontextmanager

static_directory = Path(__file__).parent / "static"

@asynccontextmanager
async def lifespan(app: FastAPI):
    await frontend(
        app=app, 
        static_directory=static_directory, 
        status="dev",
        frame="vite"
        )
    yield

app = FastAPI(lifespan=lifespan)

#app.mount("/static", StaticFiles(directory=static_directory), name="static")

@app.get("/exit")
async def exit():
    await shutdown()


if __name__ == "__main__":
    import uvicorn
    serve_development(frontend_dir="client",frame= "vite", app="app:app", title='Hallo')
    # uvicorn.run(app=app)

In June 2024, fasttools was just publicly released by software architecture Malek Ali at Yellow-SiC Group and is in alpha stage.

Anyone can install and use fasttools, There may be issues, but we are actively working to resolve them

fasttools's People

Contributors

baveaiaz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.