From 0fa4728818ff1fc7a5a949ff85034bcdb7f6e80e Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Thu, 12 Oct 2023 12:49:54 -0700 Subject: [PATCH 1/2] include intro content --- docs/intro.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/docs/intro.md b/docs/intro.md index e8b3feb..876ee09 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -5,3 +5,36 @@ sidebar_position: 1 # The Noteable Let's discover **Noteable in less than 5 minutes**. + +## What is Noteable? + +Noteable lets you **create, edit, and share** computational notebooks. You can do it as a human or enable LLMs to do it for you, like you see on the Noteable Plugin on ChatGPT. + +## Installation + +``` +pip install noteable-origami +``` + +## Configuration + +1. Log in to [Noteable](https://app.noteable.io) (sign up is free). +2. In the User Settings tab, navigate to `API Tokens` and generate a new token. +3. Set your API Token as environment variable `NOTEABLE_TOKEN` + +## Creating your First Notebook + +```python +import os +from origami.clients.api import APIClient + +api_client = APIClient() +project_id = user.origamist_default_project_id + +file = await api_client.create_notebook( + project_id=project_id, + path="Origami Demo.ipynb" +) +file +``` + From 0dc20791ca0864c867dc2c53701d93a779957083 Mon Sep 17 00:00:00 2001 From: Kyle Kelley Date: Thu, 12 Oct 2023 12:57:46 -0700 Subject: [PATCH 2/2] wrap it in asyncio run --- docs/intro.md | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/docs/intro.md b/docs/intro.md index 876ee09..1d0c5db 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -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()) ```