frictionlessdata / tabulator-py

Python library for reading and writing tabular data via streams.
https://frictionlessdata.io
MIT License
235 stars 42 forks source link

Extract format from URL query string #251

Closed cbenz closed 5 years ago

cbenz commented 6 years ago

I'm often dealing with URLs like https://domain.tls/path/to/resource?format=csv

Currently, tabulator.helpers.detect_scheme_and_format only extracts format from URLs ending with .csv (or other formats), using splitext.

I'm proposing a way to extract format from format=xxx in URL query string. It seems to me that it's a sufficiently common use case to be included in Tabulator.

Example: a commonly used OpenData platform formats its URLs like this: