Metadata-Version: 2.4
Name: webforge
Version: 3.0.0
Summary: Un framework web minimaliste et indépendant
Author: GabiMinecraft02
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# WebForge Version 3.0.0 first final release

WebForge is a lightweight, dependency-free Python mini-framework for building small websites and simple web apps with a very small API.

It lets you:
- register routes for HTML pages
- serve static assets such as CSS and JavaScript
- protect routes with a simple password gate
- run a small local HTTP server with the Python standard library

## Features

- Simple route registration with `WebForge.route()` or `WebForge.new_route()`
- Easy security setup with `WebForge.set_password()`
- Minimal built-in server via `WebForge.run()`
- No external web framework dependency required

## Installation

```bash
pip install webforge
```

## Quick Start

```python
from webforge import WebForge

app = WebForge(__name__)

@WebForge.apps
def apps():
    WebForge.new_route("/", "index.html")
    WebForge.route("/login", "login.html")

@WebForge.security
def secs():
    WebForge.set_password("/", "password", "/login")

if __name__ == "__main__":
    WebForge.run(port=5000, host="0.0.0.0")
```

## Project Layout

Create a `Public` folder in your project and organize your files like this:

```text
Public/
├── Render/
│   ├── index.html
│   └── login.html
└── Style/
    └── main.css
```

- HTML pages should be placed in `Public/Render/`
- CSS and JavaScript files can be served from `Public/Style/` or `Public/src/`

## Route Example

```python
WebForge.new_route("/", "index.html")
WebForge.route("/about", "about.html")
```

The `route()` method is simply an alias of `new_route()`.

## Security Example

```python
WebForge.set_password("/admin", "secret123", "/login")
```

This lets you protect a route by requiring the `password=...` cookie to be present.

## Run the App

```bash
python your_app.py
```

Then open your browser at:

```text
http://localhost:5000/
```

## License

This project is distributed under the MIT License.

## Status

WebForge is a small experimental framework intended for learning, lightweight internets, and simple personal site projects.

