Skip to content

Commit

Permalink
KwikAPI with type hints allowed. Type must be specifi
Browse files Browse the repository at this point in the history
  • Loading branch information
RamanjaneyuluIdavalapati committed Feb 13, 2018
1 parent 48ece9a commit e59b303
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ from kwikapi.tornado import RequestHandler
from kwikapi import API

class BaseCalc(object):
def add(self, a, b):
def add(self, a: int, b: int) -> int:
return a + b

def subtract(self, a, b):
def subtract(self, a: int, b: int) -> int:
return a - b

api = API(default_version='v1')
Expand Down Expand Up @@ -51,3 +51,5 @@ $ python sample.py
```bash
$ curl "http://localhost:8888/api/v1/add?a=10&b=10"
```

> To know how to use all features, please refer KwikAPI documentation https://github.com/deep-compute/kwikapi/blob/master/README.md

0 comments on commit e59b303

Please sign in to comment.