A simple web framework.
Project description
sitepy
A simple web framework for Python.
Installation
You can install sitepy with pip:
pip install sitepy
Usage
Here's a basic example of a sitepy application:
from sitepy import sitepy
app = sitepy()
@app.route("/", methods=['GET', 'POST'])
def index():
return "Hello, world!"
if __name__ == "__main__":
app.run()
This will start a server on localhost:8080 and respond with "Hello, world!" to GET and POST requests at the root URL.
Features
-
Simple routing: Use the @app.route decorator to define routes.
-
Middleware support: Use app.use to add middleware functions.
-
Static file serving: Files in the static directory are served at /static.
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sitepy-0.3.0rc1.tar.gz
(13.7 kB
view hashes)
Built Distribution
sitepy-0.3.0rc1-py3-none-any.whl
(22.4 kB
view hashes)
Close
Hashes for sitepy-0.3.0rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d75b67a13add3b8eb23b9983089726cd14be96bb5bf432706bbdf7725000bee2 |
|
MD5 | a75ecfced9b4381c1ebaa3b5ce483275 |
|
BLAKE2b-256 | e081fd95577eaed1618cfbcb642e7fc2b42c46ba69b85219e316ea1ff8353520 |