File tree Expand file tree Collapse file tree 3 files changed +46
-0
lines changed
Expand file tree Collapse file tree 3 files changed +46
-0
lines changed Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ Ready-to-run examples are available in `examples/`:
263263- ` examples/async_profile_list.py `
264264- ` examples/async_scrape.py `
265265- ` examples/async_session_list.py `
266+ - ` examples/async_team_credit_info.py `
266267- ` examples/async_web_crawl.py `
267268- ` examples/async_web_fetch.py `
268269- ` examples/async_web_search.py `
@@ -272,6 +273,7 @@ Ready-to-run examples are available in `examples/`:
272273- ` examples/sync_profile_list.py `
273274- ` examples/sync_scrape.py `
274275- ` examples/sync_session_list.py `
276+ - ` examples/sync_team_credit_info.py `
275277- ` examples/sync_web_crawl.py `
276278- ` examples/sync_web_fetch.py `
277279- ` examples/sync_web_search.py `
Original file line number Diff line number Diff line change 1+ """
2+ Asynchronous team credit info example.
3+
4+ Run:
5+ export HYPERBROWSER_API_KEY="your_api_key"
6+ python3 examples/async_team_credit_info.py
7+ """
8+
9+ import asyncio
10+
11+ from hyperbrowser import AsyncHyperbrowser
12+
13+
14+ async def main () -> None :
15+ async with AsyncHyperbrowser () as client :
16+ credit_info = await client .team .get_credit_info ()
17+ print (f"Usage: { credit_info .usage } " )
18+ print (f"Limit: { credit_info .limit } " )
19+ print (f"Remaining: { credit_info .remaining } " )
20+
21+
22+ if __name__ == "__main__" :
23+ asyncio .run (main ())
Original file line number Diff line number Diff line change 1+ """
2+ Synchronous team credit info example.
3+
4+ Run:
5+ export HYPERBROWSER_API_KEY="your_api_key"
6+ python3 examples/sync_team_credit_info.py
7+ """
8+
9+ from hyperbrowser import Hyperbrowser
10+
11+
12+ def main () -> None :
13+ with Hyperbrowser () as client :
14+ credit_info = client .team .get_credit_info ()
15+ print (f"Usage: { credit_info .usage } " )
16+ print (f"Limit: { credit_info .limit } " )
17+ print (f"Remaining: { credit_info .remaining } " )
18+
19+
20+ if __name__ == "__main__" :
21+ main ()
You can’t perform that action at this time.
0 commit comments