HTTP API for Python using builtin SimpleHTTPServer
Project description
Description
This is a basic HTTP API based on the processes that Flask uses, but in a simple (and more limitating) way. It's meant to be easy to use and short to the point
I described a lot the process in the source. Don't be shy to check it out if you want to understand it There's also an example.py with some basics inside
Functionnalities
- Routes with variables
- Request handler
- Security handler (which can be modified with an abstract class already present)
Basic example :
from http_api.server import HTTPServerAPI
http = HTTPServerAPI()
@http.url("/")
def index():
# Do something
http.run()
Security concerns
HTTPServer : https://docs.python.org/3/library/http.server.html
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
http-api-0.2.2.tar.gz
(7.8 kB
view hashes)
Built Distribution
http_api-0.2.2-py3-none-any.whl
(24.9 kB
view hashes)