tldraw


Nametldraw JSON
Version 3.0.0 PyPI version JSON
download
home_pageNone
SummaryTldraw for Jupyter
upload_time2024-09-17 18:28:52
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Jupyter Tldraw
[![PyPI version](https://img.shields.io/pypi/v/tldraw.svg)](https://pypi.org/project/tldraw/)
<img width="946" alt="image" src="https://github.com/kolibril13/jupyter-tldraw/assets/44469195/8ba7e662-1f35-4e3b-b342-6d9fd3079e22">


Installation:
```
python3.11 -m venv .venv
pip install jupyterlab
pip install tldraw
jupyterlab   (or alternative VS Code Jupyter Lab)
```

## Example
```
from tldraw import TldrawWidget
t = TldrawWidget()
t
```



## MakeReal Example
```
from tldraw import MakeReal
from api_key import api_key

m = MakeReal(width=1002, height = 500, api_key = api_key)
m
```
INFO: To use GPT4-Vision, you need an API key.

### How do I get my API key?

1. Create an OpenAI account at [OpenAI](https://platform.openai.com/)
2.  In your Openai API account, navigate to **[Settings > Billing](https://platform.openai.com/account/billing/overview)** 
3. Click **Add to credit balance**
4. Add at least **$5** to your account
5. Navigate to [API Keys](https://platform.openai.com/api-keys)
6. Click **Create new secret key**
7. Copy the key to your clipboard.
8. Back on your jupyter-tldraw folder, paste the key into the API key into a new file called api_key.py 
9. Add the key in this form: `api_key = "sk-*************************"`.
10. Add  `api_key.py` into your gitignore. WARNING: Don't upload your API KEY on GitHub!

Now you're ready to run!

For transparency, this is how the key is used:  
https://github.com/kolibril13/jupyter-tldraw/blob/main/src/tldraw/prompt.py#L5-L47


 
# Developer Instructions

1. Clone Repo
2. `npm i`
3. Make virutal env `python3.11 -m venv .venv && source .venv/bin/activate`
4. `pip install -e ".[dev]" `
5. `npm run dev`





# Changelog

# 3.0.0

update npm install @tldraw/tldraw@3.0.0



# 2.4.6

update npm install @tldraw/tldraw@2.4.5
TldrawSetImage implementation

## 2.4.5

* fix path
  
## 2.4.4

* better TldrawWidgetCoordinates 

## 2.4.3


* update npm install @tldraw/tldraw@2.4.3
* add ReactiveColorPicker


## 2.2.5

* include  "package.json", "node_config.mjs" to pypi, so that conda works as well.
* update to tldraw 2.2.5
* include jsx files on pypi, so that conda can build more easily.

## 2.2.4

update to tldraw 2.2.4

## 2.0.20

Add debug example

## 2.0.19

Experiment with node_config


### 2.0.17 & 2.0.18

small fixes

### 2.0.16

add TldrawWidgetCoordinates

### 2.0.15

* update tldraw version

### 2.0.14

* update to GPT4o

### 2.0.13

* fix svgAsImage problem
* update makereal to gpt4-turbo
* run_next_cell parameter

### 2.0.12

* fix cell selection bug by autoFocus={false}
* npm i @tldraw/tldraw@2.1.3


### 2.0.11

* updating npm install @tldraw/tldraw@2.1.0

### 2.0.9 & 2.0.10

* Setting up hatch correctly

### 2.0.8

* Update version to @tldraw/tldraw@2.0.2


### 2.0.7

*increase number of output tokens to 4096

### 2.0.6

Tweak prompt parameter.

### 2.0.5

Add requests module
Tweak readme

### 2.0.4

Add experimental SVG/PNG export.  
Add experimental .txt export.  
Add makereal


## 2.0.3

Update to version `2.0.0-alpha.19`


## 2.0.2

Add experimental TldrawImageArray

## 2.0.1

Switch to new version: `@tldraw/tldraw@2.0.0-canary.b9d82466295e` (Version from 6th November2023)

<!-- npm install @tldraw/tldraw@2.0.0-canary.b9d82466295e -->

## 2.0.0

* simplify to minimal template


## 1.0.0

* Rename notebooks, and prepare 2.0.0 release.

## 0.1.5

* add .venv to gitignore, so that it's not uploaded to pypi by hatch build.

## 0.1.4

* Add experimental TldrawSegmentation


## 0.1.3
* format toml

## 0.1.2

* replace ipyreact backend with anywidget backend.
  * this will make this package more reliable, because all js and css is shipped via pip and not anymore via cdn.
* Remove JupyterLite build.
* Remove experimental files.


## 0.1.1

* add update_plot in TldrawMatplotlib

## 0.1.0

* Added TldrawMatplotlib

## 0.0.3

* refactor readme
* add jupyterlite demo
## 0.0.2

* refactor code

## 0.0.1

* init setup

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tldraw",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/d8/55/e1afa8e62f0d5cacfcd2201e079d8c2bd88edd2df59f8d91d8b55265d0c0/tldraw-3.0.0.tar.gz",
    "platform": null,
    "description": "# Jupyter Tldraw\n[![PyPI version](https://img.shields.io/pypi/v/tldraw.svg)](https://pypi.org/project/tldraw/)\n<img width=\"946\" alt=\"image\" src=\"https://github.com/kolibril13/jupyter-tldraw/assets/44469195/8ba7e662-1f35-4e3b-b342-6d9fd3079e22\">\n\n\nInstallation:\n```\npython3.11 -m venv .venv\npip install jupyterlab\npip install tldraw\njupyterlab   (or alternative VS Code Jupyter Lab)\n```\n\n## Example\n```\nfrom tldraw import TldrawWidget\nt = TldrawWidget()\nt\n```\n\n\n\n## MakeReal Example\n```\nfrom tldraw import MakeReal\nfrom api_key import api_key\n\nm = MakeReal(width=1002, height = 500, api_key = api_key)\nm\n```\nINFO: To use GPT4-Vision, you need an API key.\n\n### How do I get my API key?\n\n1. Create an OpenAI account at [OpenAI](https://platform.openai.com/)\n2.  In your Openai API account, navigate to **[Settings > Billing](https://platform.openai.com/account/billing/overview)** \n3. Click **Add to credit balance**\n4. Add at least **$5** to your account\n5. Navigate to [API Keys](https://platform.openai.com/api-keys)\n6. Click **Create new secret key**\n7. Copy the key to your clipboard.\n8. Back on your jupyter-tldraw folder, paste the key into the API key into a new file called api_key.py \n9. Add the key in this form: `api_key = \"sk-*************************\"`.\n10. Add  `api_key.py` into your gitignore. WARNING: Don't upload your API KEY on GitHub!\n\nNow you're ready to run!\n\nFor transparency, this is how the key is used:  \nhttps://github.com/kolibril13/jupyter-tldraw/blob/main/src/tldraw/prompt.py#L5-L47\n\n\n \n# Developer Instructions\n\n1. Clone Repo\n2. `npm i`\n3. Make virutal env `python3.11 -m venv .venv && source .venv/bin/activate`\n4. `pip install -e \".[dev]\" `\n5. `npm run dev`\n\n\n\n\n\n# Changelog\n\n# 3.0.0\n\nupdate npm install @tldraw/tldraw@3.0.0\n\n\n\n# 2.4.6\n\nupdate npm install @tldraw/tldraw@2.4.5\nTldrawSetImage implementation\n\n## 2.4.5\n\n* fix path\n  \n## 2.4.4\n\n* better TldrawWidgetCoordinates \n\n## 2.4.3\n\n\n* update npm install @tldraw/tldraw@2.4.3\n* add ReactiveColorPicker\n\n\n## 2.2.5\n\n* include  \"package.json\", \"node_config.mjs\" to pypi, so that conda works as well.\n* update to tldraw 2.2.5\n* include jsx files on pypi, so that conda can build more easily.\n\n## 2.2.4\n\nupdate to tldraw 2.2.4\n\n## 2.0.20\n\nAdd debug example\n\n## 2.0.19\n\nExperiment with node_config\n\n\n### 2.0.17 & 2.0.18\n\nsmall fixes\n\n### 2.0.16\n\nadd TldrawWidgetCoordinates\n\n### 2.0.15\n\n* update tldraw version\n\n### 2.0.14\n\n* update to GPT4o\n\n### 2.0.13\n\n* fix svgAsImage problem\n* update makereal to gpt4-turbo\n* run_next_cell parameter\n\n### 2.0.12\n\n* fix cell selection bug by autoFocus={false}\n* npm i @tldraw/tldraw@2.1.3\n\n\n### 2.0.11\n\n* updating npm install @tldraw/tldraw@2.1.0\n\n### 2.0.9 & 2.0.10\n\n* Setting up hatch correctly\n\n### 2.0.8\n\n* Update version to @tldraw/tldraw@2.0.2\n\n\n### 2.0.7\n\n*increase number of output tokens to 4096\n\n### 2.0.6\n\nTweak prompt parameter.\n\n### 2.0.5\n\nAdd requests module\nTweak readme\n\n### 2.0.4\n\nAdd experimental SVG/PNG export.  \nAdd experimental .txt export.  \nAdd makereal\n\n\n## 2.0.3\n\nUpdate to version `2.0.0-alpha.19`\n\n\n## 2.0.2\n\nAdd experimental TldrawImageArray\n\n## 2.0.1\n\nSwitch to new version: `@tldraw/tldraw@2.0.0-canary.b9d82466295e` (Version from 6th November2023)\n\n<!-- npm install @tldraw/tldraw@2.0.0-canary.b9d82466295e -->\n\n## 2.0.0\n\n* simplify to minimal template\n\n\n## 1.0.0\n\n* Rename notebooks, and prepare 2.0.0 release.\n\n## 0.1.5\n\n* add .venv to gitignore, so that it's not uploaded to pypi by hatch build.\n\n## 0.1.4\n\n* Add experimental TldrawSegmentation\n\n\n## 0.1.3\n* format toml\n\n## 0.1.2\n\n* replace ipyreact backend with anywidget backend.\n  * this will make this package more reliable, because all js and css is shipped via pip and not anymore via cdn.\n* Remove JupyterLite build.\n* Remove experimental files.\n\n\n## 0.1.1\n\n* add update_plot in TldrawMatplotlib\n\n## 0.1.0\n\n* Added TldrawMatplotlib\n\n## 0.0.3\n\n* refactor readme\n* add jupyterlite demo\n## 0.0.2\n\n* refactor code\n\n## 0.0.1\n\n* init setup\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Tldraw for Jupyter",
    "version": "3.0.0",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "47ae804bcb5796e8b4559c517167d3db408e75732acb0204a8b6be31be497f5b",
                "md5": "d6c66de867a2f9eea71454a1f13cec83",
                "sha256": "ef862d2022e4a82b7f4ac917c1a40ef9cb816032b8176afa1a53cbe12e60455a"
            },
            "downloads": -1,
            "filename": "tldraw-3.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d6c66de867a2f9eea71454a1f13cec83",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 9079539,
            "upload_time": "2024-09-17T18:28:45",
            "upload_time_iso_8601": "2024-09-17T18:28:45.237190Z",
            "url": "https://files.pythonhosted.org/packages/47/ae/804bcb5796e8b4559c517167d3db408e75732acb0204a8b6be31be497f5b/tldraw-3.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d855e1afa8e62f0d5cacfcd2201e079d8c2bd88edd2df59f8d91d8b55265d0c0",
                "md5": "389277c1704f3e9e7b2622649034ce4a",
                "sha256": "80b7f80fce79b5bc9e1f4260581d72ec69e8245b8eaace193259629f32189c78"
            },
            "downloads": -1,
            "filename": "tldraw-3.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "389277c1704f3e9e7b2622649034ce4a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9072483,
            "upload_time": "2024-09-17T18:28:52",
            "upload_time_iso_8601": "2024-09-17T18:28:52.393800Z",
            "url": "https://files.pythonhosted.org/packages/d8/55/e1afa8e62f0d5cacfcd2201e079d8c2bd88edd2df59f8d91d8b55265d0c0/tldraw-3.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-17 18:28:52",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tldraw"
}
        
Elapsed time: 0.93142s