From eb101ba23cc5742dd03fd011c12eeb687a3c8154 Mon Sep 17 00:00:00 2001 From: RamanjaneyuluIdavalapati Date: Thu, 8 Feb 2018 19:26:15 +0530 Subject: [PATCH 1/2] Type checking removed --- .travis.yml | 4 ++-- README.md | 12 ++++++------ setup.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c43c3a4..d1f256f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,8 @@ deploy: - kwikapi/__init__.py - kwikapi/django/__init__.py - kwikapi/django/kwikapi_django.py - name: kwikapi.django-0.1 - tag_name: 0.1 + name: kwikapi.django-0.2 + tag_name: 0.2 on: repo: deep-compute/kwikapi.django - provider: pypi diff --git a/README.md b/README.md index f3ee4f8..36c7d02 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ $ pip install kwikapi[django] ### Create a Django project -(Ref: https://docs.djangoproject.com/en/1.9/intro/tutorial01/) +(Ref: https://docs.djangoproject.com/en/1.11/intro/tutorial01/) ```bash $ django-admin startproject django_kwikapi @@ -57,7 +57,7 @@ urlpatterns = [ from django.conf.urls import url, include from . import views -from kwikapi_django import RequestHandler +from kwikapi.django import RequestHandler urlpatterns = [ url(r'api/', RequestHandler(views.api).handle_request), @@ -74,17 +74,17 @@ from kwikapi import API from logging import Logger class BaseCalc(): - def add(self, request, a: int, b: int): + def add(self, a, b): return a + b - def subtract(self, request, a: int, b: int): + def subtract(self, a, b): return a - b class StandardCalc(): - def multiply(self, request, a: int, b: int): + def multiply(self, a, b): return a * b - def divide(self, request, a: int, b: int): + def divide(self, a, b): return a / b api = API(Logger, default_version='v1') diff --git a/setup.py b/setup.py index 88fdf80..e97a1e3 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,6 @@ from setuptools import setup, find_packages -version = '0.1' +version = '0.2' setup( name="kwikapi-django", version=version, From 5ab059facb27bd83881425bd55a8cf7176e42a2e Mon Sep 17 00:00:00 2001 From: RamanjaneyuluIdavalapati Date: Tue, 13 Feb 2018 17:42:27 +0530 Subject: [PATCH 2/2] KwikAPI with type hints allowed. Type must be specified and type conversion was removed --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 36c7d02..8426638 100644 --- a/README.md +++ b/README.md @@ -74,17 +74,17 @@ from kwikapi import API from logging import Logger class BaseCalc(): - 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 class StandardCalc(): - def multiply(self, a, b): + def multiply(self, a: int, b: int) -> int: return a * b - def divide(self, a, b): + def divide(self, a: int, b: int) -> float: return a / b api = API(Logger, default_version='v1')