简体   繁体   English

如何在 Python rest ZDB974238714CA8DE634A7CE1D08 中发送大型 json 数据作为响应?

[英]How to send large json data as response in Python rest API?

Sending the last amount of data as API response can create problems sometimes.将最后一批数据作为 API 响应发送有时会产生问题。 So I want to send data in parts.所以我想分部分发送数据。 Ex: I have 450 rows of data then I want to send response in 5 parts例如:我有 450 行数据,然后我想分 5 部分发送响应

  1. Part 1 = Row 1- 100第 1 部分 = 第 1-100 行
  2. Part 2 = Row 101- 200第 2 部分 = 第 101-200 行
  3. Part 3 = Row 201- 300第 3 部分 = 第 201-300 行
  4. Part 4 = Row 301- 400第 4 部分 = 第 301-400 行
  5. Part 5 = Row 400- 450第 5 部分 = 第 400-450 行

Sending the last amount of data as API response can create problems sometimes.将最后一批数据作为 API 响应发送有时会产生问题。 So I want to send data in parts.所以我想分部分发送数据。 Ex: I have 450 rows of data then I want to send response in 5 parts例如:我有 450 行数据,然后我想分 5 部分发送响应

  1. Part 1 = Row 1- 100第 1 部分 = 第 1-100 行
  2. Part 2 = Row 101- 200第 2 部分 = 第 101-200 行
  3. Part 3 = Row 201- 300第 3 部分 = 第 201-300 行
  4. Part 4 = Row 301- 400第 4 部分 = 第 301-400 行
  5. Part 5 = Row 400- 450第 5 部分 = 第 400-450 行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM