gtalarico / pyairtable

Python Api Client for Airtable
https://pyairtable.readthedocs.io
MIT License
765 stars 138 forks source link

Is it possible to fetch data from a particular view of a table? #221

Closed OscarSantosMu closed 1 year ago

OscarSantosMu commented 1 year ago

Why?

To avoid loading all the data.

How?

The official JS API has something to handle this.

let table = base.getTable("Tasks");  
let view = table.getView("Todo");  
console.log(view);

This could simplify code logic, save memory and improve efficiency.

OscarSantosMu commented 1 year ago

Just found in the docs that there is a view Keyword Argument.

table = Table(api_key, base_id, "Tasks")
records = table.all(view="Todo")
print(records)