apicrafter-0.0.1.6
توضیحات
Helps users construct a simple HTTP API.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | apicrafter-0.0.1.6 |
| نام | apicrafter |
| نسخه کتابخانه | 0.0.1.6 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Steven Sheffey |
| ایمیل نویسنده | stevensheffey4@gmail.com |
| آدرس صفحه اصلی | https://github.com/Starfys/apicrafter |
| آدرس اینترنتی | https://pypi.org/project/apicrafter/ |
| مجوز | GPLv3 |
# 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!
نحوه نصب
نصب پکیج whl apicrafter-0.0.1.6:
pip install apicrafter-0.0.1.6.whl
نصب پکیج tar.gz apicrafter-0.0.1.6:
pip install apicrafter-0.0.1.6.tar.gz