Metadata-Version: 2.4
Name: akpy
Version: 0.1.0
Summary: AKPy - Lightweight Flask-like Python Framework
Author: Amal K P
Classifier: Programming Language :: Python :: 3
Classifier: Framework :: Flask
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# AKPy 🚀

**AKPy** is a lightweight, Flask-like Python web framework designed for simplicity, speed, and learning how web frameworks work under the hood.

Built from scratch with clean architecture, AKPy gives you full control while staying minimal.

---

## ✨ Features

* ⚡ Simple and clean routing system
* 🔗 Dynamic routes (`/user/<name>`)
* 📦 JSON response support
* 🧩 Middleware system
* 🖼️ Basic template rendering
* 📁 Static file serving
* 🖥️ CLI tool (`akpy run`)
* 📦 pip-installable package

---

## 📦 Installation

```bash
pip install akpy
```

---

## 🚀 Quick Start

Create a file `app.py`:

```python
from akpy import AKPy

app = AKPy()

@app.route("/")
def home(req):
    return "Hello, AKPy!"

@app.route("/user/<name>")
def user(req, name):
    return {"user": name}
```

Run the server:

```bash
akpy run app:app
```

Open in browser:

```
http://127.0.0.1:5000
```

---

## 🧠 Routing

```python
@app.route("/hello/<name>")
def greet(req, name):
    return f"Hello {name}"
```

---

## 📦 JSON Response

Return a dictionary:

```python
@app.route("/api")
def api(req):
    return {"status": "success"}
```

AKPy automatically converts it to JSON.

---

## 🧩 Middleware

```python
def logger(req):
    print(f"{req.method} {req.path}")

app.use(logger)
```

---

## 🖼️ Templates

```python
from akpy.templating import render_template

@app.route("/html")
def html(req):
    return render_template("templates/index.html", name="AKPy")
```

Example `index.html`:

```html
<h1>Hello {{name}}</h1>
```

---

## 📁 Static Files

Place files inside a `static/` folder:

```
/static/style.css
```

Access in browser:

```
http://127.0.0.1:5000/static/style.css
```

---

## 🛠️ CLI Usage

```bash
akpy run module:app
```

Example:

```bash
akpy run example.app:app
```

---

## 📁 Project Structure

```
akpy/
│
├── akpy/
├── cli/
├── example/
├── setup.py
├── pyproject.toml
└── README.md
```
akpy run app:app --debug
---

## 🔄 Development Setup

```bash
python -m venv venv
venv\Scripts\activate
pip install -e .
```

---

## 📌 Roadmap

* 🔥 Hot reload (dev mode)
* ⚡ Async support (FastAPI style)
* 🗄️ Database integration
* 🎨 Advanced template engine
* 🔐 Authentication system

---

## 🤝 Contributing

Pull requests are welcome. For major changes, open an issue first.

---

## 📄 License

MIT License

---

## 👨‍💻 Author

**Amal K P**

---

## ⭐ Support

If you like this project, give it a star on GitHub ⭐
