Helps users construct a simple HTTP API.
Project description
# apicrafter
apicrafter helps people create simple HTTP APIs easily.
To start creating an API, all you need is a path, a function, and a method
For example:
```python
import apicrafter
def root_request_handler(request):
request.respond("<b>Hello, world!</b>")
#Starts ApiServer on all interfaces on port 8080
my_server = apicrafter.ApiServer('all', 8080)
my_server.add_handler('/', root_request_handler, 'GET')
my_server.start()
```
Then, just navigate to http://localhost:8080 on the web browser of your choice!
apicrafter helps people create simple HTTP APIs easily.
To start creating an API, all you need is a path, a function, and a method
For example:
```python
import apicrafter
def root_request_handler(request):
request.respond("<b>Hello, world!</b>")
#Starts ApiServer on all interfaces on port 8080
my_server = apicrafter.ApiServer('all', 8080)
my_server.add_handler('/', root_request_handler, 'GET')
my_server.start()
```
Then, just navigate to http://localhost:8080 on the web browser of your choice!
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
apicrafter-0.0.1.4.tar.gz
(17.2 kB
view hashes)