Skip to main content

Helps users construct a simple HTTP API.

Project description

# apicrafter
apicrafter helps people create simple HTTP APIs easily.

## Requirements
apicrafter requires Python 3

## Installation
To install the latest stable version with pip
```bash
$ pip install apicrafter
```

## Quick start
To start creating an API, all you need is a path, a function, and a method
```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


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.6.tar.gz (17.4 kB view details)

Uploaded Source

File details

Details for the file apicrafter-0.0.1.6.tar.gz.

File metadata

File hashes

Hashes for apicrafter-0.0.1.6.tar.gz
Algorithm Hash digest
SHA256 efb7843c801a8d56c22706daca874f293d2effca01de6755ae7213bbaa714d5d
MD5 1214f12c8d5804951278c4539a8b5bec
BLAKE2b-256 b961043121fd949fdd1352759bc503754174e8596bafd9da8a92ee92ced7982b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page