티스토리 뷰
반응형
출처: http://flask.pocoo.org/docs/0.12/patterns/streaming/
Basic Usage¶
This is a basic view function that generates a lot of CSV data on the fly. The trick is to have an inner function that uses a generator to generate data and to then invoke that function and pass it to a response object:
Each yield expression is directly sent to the browser. Note though that some WSGI middlewares might break streaming, so be careful there in debug environments with profilers and other things you might have enabled.
Streaming from Templates
The Jinja2 template engine also supports rendering templates piece by piece. This functionality is not directly exposed by Flask because it is quite uncommon, but you can easily do it yourself:
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 매직 트랙패드2
- 르세라핌
- 별잉 빛나는 밤
- 카카오 에드
- 별이 빚나는 밤
- 루미큐브 종류
- 솔리드 쿨론
- 홈 오피스
- 유가바이트디비
- yugabyteDB
- 빈센트 반 고흐
- GKRS
- 톡토기
- 로니카 BCS
- 코라나 19
- 오미크론
- Life Chair
- JMW 헤어드라이기기
- Sybase IQ
- 파나소닉 비데 DL-EH10KWS
- 브리다 정수기
- 배당급
- 남설 팔찌
- Pixel Pals
- 증권정보포털
- node.js
- VARIDESK
- 화분벌레
- 고체 향수
- weka
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
글 보관함