xmunoz / sodapy

Python client for the Socrata Open Data API
MIT License
402 stars 114 forks source link

Optional client.get "limit" defaults to 1000. Need limit=none #83

Closed Snake883 closed 2 years ago

Snake883 commented 2 years ago

How do I get all the records from a dataset? The default limit is 1000, and I don't see a way to change the limit to none.

client = SocrataAPI(
    site,
    key,
    email,
    password
    )

dataset= client.get('g62h-syeh')
print(len(dataset))

1000

darrylackley commented 2 years ago

There is a get_all method in the API, line 417 of the socrata.py file:

https://github.com/xmunoz/sodapy/blob/master/sodapy/socrata.py

In your example above, usage would simply be:

dataset = client.get_all('g62h-syeh')