Skip to content

Commit 8f9d8ba

Browse files
Copilotrnovatorov
andcommitted
Add example for listing sites using Sites API
Co-authored-by: rnovatorov <20299819+rnovatorov@users.noreply.github.com>
1 parent 9015b25 commit 8f9d8ba

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

examples/http/list_sites.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import asyncio
2+
3+
import enapter
4+
5+
6+
async def main():
7+
config = enapter.http.api.Config.from_env()
8+
async with enapter.http.api.Client(config=config) as client:
9+
async for site in client.sites.list():
10+
print(site)
11+
12+
13+
if __name__ == "__main__":
14+
asyncio.run(main())

0 commit comments

Comments
 (0)