afeld / afeld/sodapy

Consider providing an escape hatch for users who want raw request data

Đang mở
#108 1 bình luận 1 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
430
Fork
116
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

The workhorse [`_perform_request`](https://github.com/afeld/sodapy/blob/main/sodapy/socrata.py#L516-L557) eagerly parses request data either as JSON or as CSV. This is likely fine for most users, but for users who would rather not parse the data with Python, it would be handy to have a way to opt-in to receive `response.content` (or a streaming `response.raw`). In my use case, Python is passing the data from an API to S3, so I don't need it to parse anything.

A related issue is that the parsing done by the JSON parser and the CSV parser returns different iterators. The first returns an iterator over dictionaries, while the second returns an iterator over lists (with the header inlined, which runs into #107). It would be nice if this was consistent, but not a deal breaker.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.