Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
__copyright__ = "Copyright (c) 2008-2019 Hive Solutions Lda."
""" The copyright for the module """
__license__ = "Apache License, Version 2.0"
""" The license for the module """
import json
import asyncio
import appier
import aiohttp
class Person(appier.Model):
identifier = appier.field(
type = int,
index = True,
increment = True,
default = True
)
name = appier.field()
class AsyncHTTPApp(appier.App):
def __init__(self, *args, **kwargs):
appier.App.__init__(
self,
name = "async_neo",
*args, **kwargs
)
import asyncio
import appier
import aiohttp
class Person(appier.Model):
identifier = appier.field(
type = int,
index = True,
increment = True,
default = True
)
name = appier.field()
class AsyncHTTPApp(appier.App):
def __init__(self, *args, **kwargs):
appier.App.__init__(
self,
name = "async_neo",
*args, **kwargs
)
self._register_model(Person)
@appier.route("/async", "GET")
@appier.route("/async/request", "GET")
async def request_(self):
url = self.field("url", "https://httpbin.bemisc.com/ip")
size = self.field("size", 4096, cast = int)