Skip to content

Commit

Permalink
wrap it in asyncio run
Browse files Browse the repository at this point in the history
  • Loading branch information
rgbkrk committed Oct 12, 2023
1 parent 0fa4728 commit 0dc2079
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,22 @@ pip install noteable-origami

```python
import os
import asyncio
from origami.clients.api import APIClient

api_client = APIClient()
project_id = user.origamist_default_project_id
async def main():
api_client = APIClient()

file = await api_client.create_notebook(
project_id=project_id,
path="Origami Demo.ipynb"
)
file
user = await api_client.user_info()
project_id = user.origamist_default_project_id

file = await api_client.create_notebook(
project_id=project_id,
path="Origami Demo.ipynb"
)
print(file)

if __name__ == "__main__":
asyncio.run(main())
```

0 comments on commit 0dc2079

Please sign in to comment.