argaen
f9653114d1
Update aiocache example to latest version
2017-05-15 20:30:52 +02:00
Jeremy Zimmerman
996c0b3280
Fixed with a working example
...
Remember:
K.I.S.S
2017-05-11 13:40:16 -07:00
Jeremy Zimmerman
a17b3f1b84
Use of register_blueprint will be deprecated, why not upgrade?
2017-05-11 12:33:57 -07:00
monobot
ad68739df7
modify the asyncorm example, for the new lazy querysets
2017-05-11 18:15:04 +01:00
38elements
6a14e49479
Replace stream decorator to stream parameter
2017-05-09 22:31:15 +09:00
38elements
15ad07f03d
Fix streaming.md
2017-05-08 00:10:36 +09:00
38elements
0b53c413a7
Add stream decorator for HTTPMethodView
2017-05-07 21:33:15 +09:00
38elements
931397c7e1
Add stream for CompositionView
2017-05-07 18:38:48 +09:00
38elements
ef2cc7ebf5
Add Request.stream
2017-05-07 18:38:48 +09:00
Szucs Krisztian
a42b254c33
use async version of model_to_dict
2017-05-05 10:51:12 +02:00
Szucs Krisztian
d24e1ae110
removed lines from distributed example
2017-05-05 08:25:18 +02:00
Szucs Krisztian
2e7badab4e
aiopeewee example
2017-05-05 08:19:09 +02:00
Matt Maybeno
b3101d339e
Fix typo for jinja example and converted to dir
2017-04-25 20:10:46 -07:00
Raphael Deem
b75a321e4a
Merge pull request #644 from kszucs/master
...
Example to use dask distibuted
2017-04-22 01:14:34 -07:00
Szucs Krisztian
1b939a6823
work with distributed 1.16.1
2017-04-17 11:05:19 +02:00
Szucs Krisztian
5b22d1486a
fix syntax error in comment
2017-04-16 18:13:00 +02:00
Szucs Krisztian
9eb48c2b0d
dask distributed example
2017-04-16 18:11:24 +02:00
Tom Haines
c6aaa9b09c
Use render_async and a template env with jinja2
2017-04-16 13:50:07 +01:00
Shawn Niederriter
5796f211c1
Added detailed plotly example project
2017-04-14 17:17:23 +00:00
Shawn Niederriter
0f10a36b40
Added url_for example
2017-04-12 06:20:35 +00:00
Shawn Niederriter
3c45c9170f
Fixed to merge with #626
2017-04-11 21:55:45 +00:00
Shawn Niederriter
adb7331670
Updated examples for 0.5.0
2017-04-11 20:34:55 +00:00
Shawn Niederriter
9d3bb4a37a
Updated examples in-line with response docs
2017-04-06 19:47:25 +00:00
Shawn Niederriter
c30437448b
Updated aiohttp & run_async examples, added redirect
2017-04-06 19:42:05 +00:00
Shawn Niederriter
46ac79f4dc
Update run_async demo
2017-04-06 14:39:54 -04:00
Shawn Niederriter
833b14e353
Updated aiohttp example.
2017-04-06 13:33:29 -04:00
Eli Uriegas
a09471ac6c
Merge pull request #600 from monobot/master
...
added asyncorm example
2017-03-28 22:50:20 -05:00
Eli Uriegas
a916eea684
Merge pull request #601 from SakuraSound/master
...
Detailed example with logging, database access, environment variables, and basic middleware
2017-03-28 22:49:26 -05:00
Joir-dan Gumbs
e3cf50f791
Changed out redis middleware for redis listeners (open/close). Fleshed out the payloads of both endpoints. Added comment about required packages.
2017-03-28 15:00:23 -07:00
Joir-dan Gumbs
ee79750a22
Cleaned up functions. Added extra middleware function to log endpoint being called. Added documentation to make easier to understand.
2017-03-28 01:22:36 -07:00
Joir-dan Gumbs
748ca28185
Created detailed example of using sanic. Adds configurations based on various environment variables, handles database access (using aioredis), uses middleware to check for db object and attach it to request object, and logs events to a logfile (which is set using environment variables).
2017-03-27 15:42:13 -07:00
monobot
9c68d713ba
added asyncorm example
2017-03-27 22:47:35 +01:00
messense
2b296435b3
Trigger events
2017-03-20 14:25:31 +08:00
Raphael Deem
38b9091513
Merge pull request #443 from sourcepirate/master
...
Fixed sanic peewee example.
2017-03-17 13:12:39 -07:00
messense
986ff101ce
Add an aioredis example
2017-03-17 14:16:13 +08:00
lizheao
cfc53d0d26
Change some code in sanic aiomysql code
2017-03-15 14:42:22 +08:00
lizheao
97c2056e4a
Change some code in sanic aiomysql code
2017-03-15 14:41:54 +08:00
lizheao
0ad0164171
Change some code in sanic aiomysql code
2017-03-15 14:41:38 +08:00
lizheao
df0e285b6f
Add a new example
2017-03-15 14:12:37 +08:00
Adam Gradzki
ed74bccad6
Faster asyncpg queries via a global connection pool
...
In my benchmarks I was able to obtain a 17% performance
improvement over the current asyncpg demo code with a shared
connection pool.
Resolves : #540
See also: #531
2017-03-11 17:55:57 -06:00
Jing Su
0cac45809f
add blueprints websocket example
2017-03-09 18:33:34 +08:00
Jing Su
489ca3c207
use blueprint method instead of deprecated register_blueprint
2017-03-09 18:31:19 +08:00
Raphael Deem
0860f84a39
close connection in asyncpg example
2017-03-08 18:50:41 -08:00
Raphael Deem
694207a86d
update asyncpg example
2017-03-07 19:32:26 -08:00
Eli Uriegas
8e6678d526
Merge pull request #469 from miguelgrinberg/websocket-support
...
websocket support
2017-03-05 17:42:49 -08:00
고창영(Chang-young Koh)
f6b69f412f
Fix exception_monitoring example
2017-03-03 00:55:08 +09:00
Miguel Grinberg
1d6e11ca10
addressed feedback
2017-02-27 22:35:28 -08:00
Miguel Grinberg
6e903ee7d5
websocket support, using websockets package
2017-02-27 22:35:28 -08:00
Eli Uriegas
850446195f
Merge pull request #441 from robintiwari/master
...
added sanic motor (async driver for mongodb) example
2017-02-16 17:19:42 -06:00
Eli Uriegas
9420b0c947
Adds file response object example
2017-02-16 15:53:31 -06:00
sourcepirate
e6a828572a
Changed method name from create to new
2017-02-16 11:07:49 +05:30
plasmashadow
6ea43d8e6d
Fixed sanic_peewee error and added a simple interface to query and create
2017-02-16 10:58:52 +05:30
@robintiwari
d13af4bdc4
updated examples
2017-02-15 22:11:16 -06:00
Robin
53a365dd2b
added sanic motor (async driver for mongodb) example
2017-02-15 21:42:25 -06:00
argaen
b2af8e640c
Use decorator
2017-02-14 00:12:39 +01:00
argaen
758415d326
Fixed aiocache example according to new loop policy
2017-02-13 23:08:42 +01:00
Angus Hollands
b5e50ecb75
Use app decorator instead of run arguments for before_start
...
Mirror listener of blueprints
2017-02-11 14:30:17 +00:00
Fengyuan Chen
884749f345
fix run_async demo
2017-02-04 15:27:46 +08:00
Eli Uriegas
fad9fbca6f
Merge pull request #335 from r0fls/remove-loop
...
remove loop as argument and update examples
2017-01-27 19:25:09 -06:00
Jordan Pittier
fa36dcbe09
Use `isinstance(
instead of
issubclass(type(
`
...
When we already have an `instance` it's less typing and faster to
use `isinstance`.
2017-01-27 11:11:29 +01:00
Raphael Deem
c72bcc136c
add semaphore concurrency limit example
2017-01-26 17:43:54 -08:00
Raphael Deem
d52f5f0b09
remove loop as argument and update examples
2017-01-26 17:38:46 -08:00
Raphael Deem
54ca8c787b
add async run
2017-01-25 22:47:18 -08:00
Manuel Miranda
1f89b15792
Caching example ( #334 )
...
* Caching example using aiocache
* Caching example using aiocache
* Added aiocache to requirements
* Fixed example with newest aiocache
* Fixed bug in cache example
2017-01-23 10:19:42 -06:00
Eli Uriegas
40f1e14bb7
Fix exception_monitoring example to actually work
...
Closes #324
Super was used incorrectly in the example, also fixed some formatting
here and there.
2017-01-20 14:36:15 -06:00
Raphael Deem
2c1ff5bf5d
allow using a list of hosts on a route
2017-01-18 19:41:32 -08:00
Raphael Deem
ba1e006585
update logging placement
2017-01-17 15:49:17 -08:00
Raphael Deem
62df50e22b
add vhosts to blueprints
2017-01-10 21:35:07 -08:00
Raphael Deem
4f832ac9af
add support for virtual hosts
2017-01-08 18:46:29 -08:00
easydaniel
5c7c2cf85e
Update sanic_asyncpg_example.py
...
Remove unused library
2017-01-04 23:35:06 +08:00
DanielChien
1942644434
modify config to varbles
2017-01-04 23:30:29 +08:00
DanielChien
b67482de9b
add example for asyncpg
2017-01-04 23:29:09 +08:00
Eli Uriegas
9c91b09ab1
Fix this to actually reflect current behavior
2017-01-04 00:23:59 -06:00
Raphael Deem
32ea45d403
allow overriding logging.basicConfig
2016-12-23 16:17:34 -08:00
Eli Uriegas
8fc1462d11
Merge pull request #193 from r0fls/jinja-example
...
add jinja example
2016-12-13 00:30:07 -06:00
Raphael Deem
93b45e9598
add jinja example
2016-12-12 22:25:24 -08:00
Anton Zhyrney
b44e9baaec
aiopg with sqlalchemy example
2016-12-11 14:21:02 +02:00
Anton Zhyrney
f9176bfdea
pep8&improvements
2016-12-11 14:14:03 +02:00
Anton Zhyrney
721044b378
improvements for aiopg example
2016-12-11 14:04:24 +02:00
Anton Zhyrney
154f8570f0
add sanic aiopg example with raw sql
2016-12-11 13:43:31 +02:00
38elements
9010a6573f
Add status code
2016-11-26 15:21:57 +09:00
38elements
d8e480ab48
Change sleep time
2016-11-26 14:47:42 +09:00
38elements
c01cbb3a8c
Change Request timeout process
...
This add a request timeout exception.
It cancels task, when request is timeout.
2016-11-26 13:55:45 +09:00
Jack Fischer
d9f6846c76
improved default handling
2016-11-16 07:55:54 -05:00
Jack Fischer
9e0747db15
Example for using error_handler
2016-11-15 19:37:40 -05:00
Manuel Miranda
edb25f799d
Caching example ( #150 )
...
* Caching example using aiocache
* Caching example using aiocache
* Added aiocache to requirements
* Fixed example with newest aiocache
2016-11-13 17:11:31 -06:00
Manuel Miranda
ce8742c605
Caching example using aiocache ( #140 )
...
* Keep-alive requests stay open if communicating
* time.time faster than loop.time?
* Fix flake8
* Add aiofiles to requirements.txt
* Caching example using aiocache
* Caching example using aiocache
* Added aiocache to requirements
2016-11-06 09:26:15 -06:00
Jack Fischer
5171cdd305
add example with async http requests
2016-10-26 16:53:34 -04:00
narzeja
be0739614d
better get example
2016-10-22 08:52:37 +02:00
narzeja
b048f1bad3
better POST example
2016-10-22 08:50:56 +02:00
narzeja
c3628407eb
post method doc
2016-10-22 08:48:19 +02:00
narzeja
96c13fe23c
post method requires 'GET'
2016-10-22 08:47:51 +02:00
narzeja
ac9770dd89
a bit more informative return value when posting
2016-10-22 08:46:26 +02:00
narzeja
0e2c092ce3
fix method naming conflict
2016-10-22 08:40:24 +02:00
narzeja
22876b31b1
Provide example of using peewee_async with Sanic
2016-10-22 08:36:46 +02:00
Channel Cat
9b716e97ee
Merge branch 'feature_blueprints' of https://github.com/narzeja/sanic into narzeja-feature_blueprints
2016-10-16 08:21:35 +00:00
narzeja
b19452a1a7
assert warning clarification and adding blueprint containers to app object
2016-10-16 06:48:49 +02:00
narzeja
aaf571fae4
Blueprint support, with docs, example, and tests
2016-10-16 06:43:22 +02:00
Mike Griffith
24f1040067
simple example with await. benchmarked performance with ab
2016-10-14 23:22:05 -04:00
Channel Cat
254861bc37
Reformatted code to use spaces instead of tabs
2016-10-14 19:53:49 -07:00