Skip to main content

mauweb

  • Un web framework para python

¿Como se usa?

  • Primero instalatelo

    pip install MauWeb
    
  • Crea un pequeño set up

    from mauweb import MauWeb, Path
    from mauweb.response import HttpResponse, RenderResponse, JsonResponse, FileResponse
    
    app = MauWeb() # Inicializacion
    app.set_static('/static/', '.') # Se usaria asi (https://github.com/maubg-debug/mauweb/blob/main/examples/ejemplo.html#L4)
    
    def print_received(request): # La funcion que quieras. Parametro :: request (Puedes hacer cosas como si es un 'POST' o 'GET'). Haz debuging
    
        print(request.query_string)
        return RenderResponse( # Todos se pueden importar como pone ariba
            request, # ¡Siempre!
            'ejemplo.html', # En este caso el archivo
            None # Context
        )
    
    routes = [
        Path('/', print_received), # Añade todos los routers
        # Para mas seguridad pon (Path('/awd/', print_received)) y Path('/algo', print_received)
        # Para un slash y sin.
    ]
    
    app.set_routes(routes) # Añade los routers
    
    if __name__=='__main__': # venga ya
        app.run(app) # Correr. Puedes poner como argumentos (ademas de app que es abligatorio) :: El puerto, el host
    

Licencia

Release files for MauWeb 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for MauWeb 0.0.2
File Size Uploaded
MauWeb-0.0.2.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for MauWeb 0.0.2
File Interpreter ABI Platform
MauWeb-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 24.9 kB

Release files / MauWeb-0.0.2.tar.gz

Download URL MauWeb-0.0.2.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
b8f403562a7aeba6e604c5d87bef64c91f3e59e591f137785b049fbf85eb3529
BLAKE2b-256 checksum
How to use checksums
9cec29807479ef5f972d37bf35c64968c3185d39b6240d165d5bd562395c4ea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

Release files / MauWeb-0.0.2-py3-none-any.whl

Download URL MauWeb-0.0.2-py3-none-any.whl
Size 19.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f0542f09e51d21e824f88127bb2f56c6328d8018b4d7caec6f8fafa660a4d94
BLAKE2b-256 checksum
How to use checksums
27547b13f5bc5a5e522b6d7a4cc176e5369b8165a5c4c959495473c9bed53f23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.1

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page