from aot_client import AotClient
client = AotClient()
projects = client.list_projects()
for page in projects:
for proj in page:
print(f'{proj["name"]} is available at /api/projects/{proj["slug"]}')
I still seem to be getting an error:
Traceback (most recent call last):
File "script.py", line 8, in <module>
print(f'{proj["name"]} is available at /api/projects/{proj["slug"]}')
TypeError: 'PagedResponse' object is not subscriptable
However, it seems that changing for proj in page to for proj in page.data fixes this. I just wanted to give you all a heads up about this behavior, in case its just a small mistake in what's being yielded.
In the README example:
I still seem to be getting an error:
However, it seems that changing
for proj in page
tofor proj in page.data
fixes this. I just wanted to give you all a heads up about this behavior, in case its just a small mistake in what's being yielded.