carefree-drawboard


Namecarefree-drawboard JSON
Version 0.0.3a0 PyPI version JSON
download
home_page
Summary🎨 Infinite Drawboard in Python
upload_time2023-10-16 02:07:25
maintainer
docs_urlNone
authorcarefree0910
requires_python
license
keywords python carefree-learn drawboard
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # carefree-drawboard 🎨

![Carefree Drawboard][socialify-image]

<div align="center">

<br>

**✨ Build performant, business ready web apps in pure Python.**

<br>

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/carefree0910/carefree-drawboard/blob/dev/examples/server.ipynb)
[![PyPI version](https://badge.fury.io/py/carefree-drawboard.svg)](https://badge.fury.io/py/carefree-drawboard.svg)
![Checks](https://github.com/carefree0910/carefree-drawboard/actions/workflows/checks.yml/badge.svg)
[![License](https://img.shields.io/badge/License-Apache_2.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)

### [Documentation](https://carefree0910.me/carefree-drawboard-doc/docs/getting-started) | [Examples](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples)

<div align="left">

<br>

## Installation

`carefree-drawboard` 🎨 requires the following to get started:

* Python 3.8+
* [Node.js 18+](https://nodejs.org/en/)

> To be exact, we need `^14.13.1 || ^16 || >=18` because of the `tsconfck@2.1.1` package.

```bash
pip install carefree-drawboard
npm install --global yarn
```

Although we'll always try to help you install the frontend packages, it is recommended to install them beforehands because you can receive much more verbose:

```bash
cfdraw install
```

If you are interested in the latest features, you may use `pip` to install from source as well:

```bash
git clone https://github.com/carefree0910/carefree-drawboard.git
cd carefree-drawboard
pip install -e .
```

## Your first `carefree-drawboard` 🎨 App

Create a folder (e.g., `my_fancy_app`) wherever you like, get into it, and run

```bash
cfdraw init
```

This command will write two files to your folder (`my_fancy_app`). After which you can run the app in development mode:

```bash
cfdraw run
```

> When you run this command for the first time and have not called `cfdraw install` before, we will use `yarn` to install the JavaScript dependencies for you, which may be quite slow!

And you should see your app running at http://localhost:5123. Now you can play with the generated `app.py` file and see warm reload (yeah, not hot enough because we rely on the `reload` provided by `uvicorn` 🤣).

> Notice that the generated template implements a `GaussianBlur` plugin, which requires an image to pop up. You can upload an image either by dragging it directly to the drawboard 🎨, or by clicking the `Plus` button at the top right corner and select `Upload Image`.

[Demo Video](https://user-images.githubusercontent.com/15677328/234529497-8d7f5b61-9154-4211-8d99-ec09fca0dc2d.mp4)

## Examples

* [**Getting Started**](https://carefree0910.me/carefree-drawboard-doc/docs/getting-started), which is a more detailed tutorial to guide you step by step.
* [Image Processing](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/image_processing), which implements three common image processing plugins. It also shows how to use the `IPluginGroup` in `carefree-drawboard` 🎨 to group the plugins together and make the UI cleaner.
* [Stable Diffusion](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion), which utilizes the famous `diffusers` library and implements two common SD plugins.
* [**Caption & Diffusion**](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/caption_and_diffusion), which shows how can we combine two different kinds of models (`Image Captioning` & `Stable Diffusion`) and make them work together.
* [Stable Diffusion Inpainting](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion_inpainting), which shows how can we implement complicated plugins like `StableDiffusionInpainting` very easily.
* [Stable Diffusion ControlNet](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion_controlnet), which shows how can we decouple complicated workflows like `ControlNet` into separate, lightweight, and reusable plugins very easily.
* [**Carefree Creator**](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/carefree_creator), which contains a free, public-available [demo](https://drawboard-demo.nolibox.com/) of the real world business ready product we are selling. It is a web app with tons of AI magics, but still remains easy for `carefree-drawboard` 🎨 to implement them.

## Status

`carefree-drawboard` 🎨 is at a VERY early stage (it is launched in April 2023), so although it could be production ready (see [here](https://carefree0910.me/carefree-drawboard-doc/docs/user-guides/production) for more details), it does not have many real world use cases (yet).

But we will rapidly update this project and launch new features every week (or, even everyday), so ⭐ star and 👀 watch this repository to stay up to date!

## Contributing

* It might be the best to start from the [Contributing](https://carefree0910.me/carefree-drawboard-doc/docs/contributing-guides/contributing) page.
* If you are truly an enthusiast, you may check out our [Roadmap](https://carefree0910.me/carefree-drawboard-doc/docs/about/roadmap), pick up what you are interested, and create the corresponding PR!

### Style Guide

If you are still interested: `carefree-drawboard` 🎨 adopted [`black`](https://github.com/psf/black) and [`mypy`](https://github.com/python/mypy) to stylize its codes, so you may need to check the format, coding style and type hint with them before your codes could actually be merged.

## Q&A

### Where are my creations stored?

They are stored on your local machine, so you're 100% privacy secured!

> The default dir is `~/.cache/carefree-draw`, but you can change it manually 

### Why Using 🎨 All Around?

Good question, so I asked GPT-4, it said:

> 🎨 (Artist Palette) - This emoji represents creativity, design, and artistic expression, which are all key aspects of the `carefree-drawboard` 🎨 platform.

Cool!

### Will there be a Discord Community?

Many thanks to [JSDu](https://github.com/JamesBonddu), who created a [Discord channel](https://discord.gg/UkfpFFmNd2) for my projects!!

如果有热心观众对这个项目感兴趣并愿意帮忙建立一个中文社区,欢迎联系我,我会非常感激的!!

**更新:** 热心观众([JSDu](https://github.com/JamesBonddu))出现啦!非常感谢!!!(猛戳[这里](https://discord.gg/UkfpFFmNd2)加入我们!)

### Why do you build this project?

> Also check [Design Philosophy](https://carefree0910.me/carefree-drawboard-doc/docs/reference/design-philosophy).

In short, I believe that:
* Infinite Drawboard can unleash Infinite possibilities.
* If we can use `Python` to interact with it and even craft new plugins for it, it will be even better.

So here comes the `carefree-drawboard` 🎨, which is a `Python` interactible/customizable Infinite Drawboard. 🎉

My another motivation is that I love HuggingFace 🤗 models, and would love to use most if not all of them in one, single, integrated space. This actually inspires me the following idea: to build an 'AI Operation System' which can drive all the 'Softwares' (the AI models) and make them work together seamlessly.

> See [Brainstorm](https://carefree0910.me/carefree-drawboard-doc/docs/reference/brainstorm) for more details!

My final goal is to make `carefree-drawboard` 🎨 a platform which can be used to build all kinds of AI applications. I know it will be a long journey but it is definitely worth trying.

> And the middle-term goal is to make 🤗 & 🎨 appear together more often. We may think 🤗🎨 as HuggingFace models using a powerful palette to create the world (with AI)!

## Credits

- [llunalabs](https://www.llunalabs.com/), for the kindeness & community support.
- [pynecone](https://github.com/pynecone-io/pynecone), which inspires me a lot.
- [Stable Diffusion](https://github.com/CompVis/stable-diffusion), the foundation of various image generation methods.
- [Diffusers](https://github.com/huggingface/diffusers), the adopted library for the [Stable Diffusion](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion) example.
- [@liujs1](https://github.com/liujs1), who provides me the nice looking icons.
- And You! Thank you for watching!

[socialify-image]: https://socialify.git.ci/carefree0910/carefree-drawboard/image?description=1&descriptionEditable=Infinite%20Drawboard%20in%20Python%20🐍&forks=1&issues=1&logo=https%3A%2F%2Fem-content.zobj.net%2Fthumbs%2F240%2Fmicrosoft%2F319%2Fartist-palette_1f3a8.png&name=1&pattern=Floating%20Cogs&stargazers=1&theme=Auto

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "carefree-drawboard",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python carefree-learn drawboard",
    "author": "carefree0910",
    "author_email": "syameimaru.saki@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/ba/2b/40c1c943715013ce9be7c532af4b1330aa171e5fb9d7e2c0f1535b487421/carefree-drawboard-0.0.3a0.tar.gz",
    "platform": null,
    "description": "# carefree-drawboard \ud83c\udfa8\n\n![Carefree Drawboard][socialify-image]\n\n<div align=\"center\">\n\n<br>\n\n**\u2728 Build performant, business ready web apps in pure Python.**\n\n<br>\n\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/carefree0910/carefree-drawboard/blob/dev/examples/server.ipynb)\n[![PyPI version](https://badge.fury.io/py/carefree-drawboard.svg)](https://badge.fury.io/py/carefree-drawboard.svg)\n![Checks](https://github.com/carefree0910/carefree-drawboard/actions/workflows/checks.yml/badge.svg)\n[![License](https://img.shields.io/badge/License-Apache_2.0-yellowgreen.svg)](https://opensource.org/licenses/Apache-2.0)\n\n### [Documentation](https://carefree0910.me/carefree-drawboard-doc/docs/getting-started) | [Examples](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples)\n\n<div align=\"left\">\n\n<br>\n\n## Installation\n\n`carefree-drawboard` \ud83c\udfa8 requires the following to get started:\n\n* Python 3.8+\n* [Node.js 18+](https://nodejs.org/en/)\n\n> To be exact, we need `^14.13.1 || ^16 || >=18` because of the `tsconfck@2.1.1` package.\n\n```bash\npip install carefree-drawboard\nnpm install --global yarn\n```\n\nAlthough we'll always try to help you install the frontend packages, it is recommended to install them beforehands because you can receive much more verbose:\n\n```bash\ncfdraw install\n```\n\nIf you are interested in the latest features, you may use `pip` to install from source as well:\n\n```bash\ngit clone https://github.com/carefree0910/carefree-drawboard.git\ncd carefree-drawboard\npip install -e .\n```\n\n## Your first `carefree-drawboard` \ud83c\udfa8 App\n\nCreate a folder (e.g., `my_fancy_app`) wherever you like, get into it, and run\n\n```bash\ncfdraw init\n```\n\nThis command will write two files to your folder (`my_fancy_app`). After which you can run the app in development mode:\n\n```bash\ncfdraw run\n```\n\n> When you run this command for the first time and have not called `cfdraw install` before, we will use `yarn` to install the JavaScript dependencies for you, which may be quite slow!\n\nAnd you should see your app running at http://localhost:5123. Now you can play with the generated `app.py` file and see warm reload (yeah, not hot enough because we rely on the `reload` provided by `uvicorn` \ud83e\udd23).\n\n> Notice that the generated template implements a `GaussianBlur` plugin, which requires an image to pop up. You can upload an image either by dragging it directly to the drawboard \ud83c\udfa8, or by clicking the `Plus` button at the top right corner and select `Upload Image`.\n\n[Demo Video](https://user-images.githubusercontent.com/15677328/234529497-8d7f5b61-9154-4211-8d99-ec09fca0dc2d.mp4)\n\n## Examples\n\n* [**Getting Started**](https://carefree0910.me/carefree-drawboard-doc/docs/getting-started), which is a more detailed tutorial to guide you step by step.\n* [Image Processing](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/image_processing), which implements three common image processing plugins. It also shows how to use the `IPluginGroup` in `carefree-drawboard` \ud83c\udfa8 to group the plugins together and make the UI cleaner.\n* [Stable Diffusion](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion), which utilizes the famous `diffusers` library and implements two common SD plugins.\n* [**Caption & Diffusion**](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/caption_and_diffusion), which shows how can we combine two different kinds of models (`Image Captioning` & `Stable Diffusion`) and make them work together.\n* [Stable Diffusion Inpainting](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion_inpainting), which shows how can we implement complicated plugins like `StableDiffusionInpainting` very easily.\n* [Stable Diffusion ControlNet](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion_controlnet), which shows how can we decouple complicated workflows like `ControlNet` into separate, lightweight, and reusable plugins very easily.\n* [**Carefree Creator**](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/carefree_creator), which contains a free, public-available [demo](https://drawboard-demo.nolibox.com/) of the real world business ready product we are selling. It is a web app with tons of AI magics, but still remains easy for `carefree-drawboard` \ud83c\udfa8 to implement them.\n\n## Status\n\n`carefree-drawboard` \ud83c\udfa8 is at a VERY early stage (it is launched in April 2023), so although it could be production ready (see [here](https://carefree0910.me/carefree-drawboard-doc/docs/user-guides/production) for more details), it does not have many real world use cases (yet).\n\nBut we will rapidly update this project and launch new features every week (or, even everyday), so \u2b50 star and \ud83d\udc40 watch this repository to stay up to date!\n\n## Contributing\n\n* It might be the best to start from the [Contributing](https://carefree0910.me/carefree-drawboard-doc/docs/contributing-guides/contributing) page.\n* If you are truly an enthusiast, you may check out our [Roadmap](https://carefree0910.me/carefree-drawboard-doc/docs/about/roadmap), pick up what you are interested, and create the corresponding PR!\n\n### Style Guide\n\nIf you are still interested: `carefree-drawboard` \ud83c\udfa8 adopted [`black`](https://github.com/psf/black) and [`mypy`](https://github.com/python/mypy) to stylize its codes, so you may need to check the format, coding style and type hint with them before your codes could actually be merged.\n\n## Q&A\n\n### Where are my creations stored?\n\nThey are stored on your local machine, so you're 100% privacy secured!\n\n> The default dir is `~/.cache/carefree-draw`, but you can change it manually \n\n### Why Using \ud83c\udfa8 All Around?\n\nGood question, so I asked GPT-4, it said:\n\n> \ud83c\udfa8 (Artist Palette) - This emoji represents creativity, design, and artistic expression, which are all key aspects of the `carefree-drawboard` \ud83c\udfa8 platform.\n\nCool!\n\n### Will there be a Discord Community?\n\nMany thanks to [JSDu](https://github.com/JamesBonddu), who created a [Discord channel](https://discord.gg/UkfpFFmNd2) for my projects!!\n\n\u5982\u679c\u6709\u70ed\u5fc3\u89c2\u4f17\u5bf9\u8fd9\u4e2a\u9879\u76ee\u611f\u5174\u8da3\u5e76\u613f\u610f\u5e2e\u5fd9\u5efa\u7acb\u4e00\u4e2a\u4e2d\u6587\u793e\u533a\uff0c\u6b22\u8fce\u8054\u7cfb\u6211\uff0c\u6211\u4f1a\u975e\u5e38\u611f\u6fc0\u7684\uff01\uff01\n\n**\u66f4\u65b0\uff1a** \u70ed\u5fc3\u89c2\u4f17\uff08[JSDu](https://github.com/JamesBonddu)\uff09\u51fa\u73b0\u5566\uff01\u975e\u5e38\u611f\u8c22\uff01\uff01\uff01\uff08\u731b\u6233[\u8fd9\u91cc](https://discord.gg/UkfpFFmNd2)\u52a0\u5165\u6211\u4eec\uff01\uff09\n\n### Why do you build this project?\n\n> Also check [Design Philosophy](https://carefree0910.me/carefree-drawboard-doc/docs/reference/design-philosophy).\n\nIn short, I believe that:\n* Infinite Drawboard can unleash Infinite possibilities.\n* If we can use `Python` to interact with it and even craft new plugins for it, it will be even better.\n\nSo here comes the `carefree-drawboard` \ud83c\udfa8, which is a `Python` interactible/customizable Infinite Drawboard. \ud83c\udf89\n\nMy another motivation is that I love HuggingFace \ud83e\udd17 models, and would love to use most if not all of them in one, single, integrated space. This actually inspires me the following idea: to build an 'AI Operation System' which can drive all the 'Softwares' (the AI models) and make them work together seamlessly.\n\n> See [Brainstorm](https://carefree0910.me/carefree-drawboard-doc/docs/reference/brainstorm) for more details!\n\nMy final goal is to make `carefree-drawboard` \ud83c\udfa8 a platform which can be used to build all kinds of AI applications. I know it will be a long journey but it is definitely worth trying.\n\n> And the middle-term goal is to make \ud83e\udd17 & \ud83c\udfa8 appear together more often. We may think \ud83e\udd17\ud83c\udfa8 as HuggingFace models using a powerful palette to create the world (with AI)!\n\n## Credits\n\n- [llunalabs](https://www.llunalabs.com/), for the kindeness & community support.\n- [pynecone](https://github.com/pynecone-io/pynecone), which inspires me a lot.\n- [Stable Diffusion](https://github.com/CompVis/stable-diffusion), the foundation of various image generation methods.\n- [Diffusers](https://github.com/huggingface/diffusers), the adopted library for the [Stable Diffusion](https://github.com/carefree0910/carefree-drawboard/tree/dev/examples/stable_diffusion) example.\n- [@liujs1](https://github.com/liujs1), who provides me the nice looking icons.\n- And You! Thank you for watching!\n\n[socialify-image]: https://socialify.git.ci/carefree0910/carefree-drawboard/image?description=1&descriptionEditable=Infinite%20Drawboard%20in%20Python%20\ud83d\udc0d&forks=1&issues=1&logo=https%3A%2F%2Fem-content.zobj.net%2Fthumbs%2F240%2Fmicrosoft%2F319%2Fartist-palette_1f3a8.png&name=1&pattern=Floating%20Cogs&stargazers=1&theme=Auto\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "\ud83c\udfa8 Infinite Drawboard in Python",
    "version": "0.0.3a0",
    "project_urls": null,
    "split_keywords": [
        "python",
        "carefree-learn",
        "drawboard"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ba2b40c1c943715013ce9be7c532af4b1330aa171e5fb9d7e2c0f1535b487421",
                "md5": "719527d072da12df59d1afb2d8761509",
                "sha256": "743f96a9afdd16c1f3a3fd37800ac3551642f3fa7a81ec385115dae8aac33c00"
            },
            "downloads": -1,
            "filename": "carefree-drawboard-0.0.3a0.tar.gz",
            "has_sig": false,
            "md5_digest": "719527d072da12df59d1afb2d8761509",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 197074,
            "upload_time": "2023-10-16T02:07:25",
            "upload_time_iso_8601": "2023-10-16T02:07:25.715120Z",
            "url": "https://files.pythonhosted.org/packages/ba/2b/40c1c943715013ce9be7c532af4b1330aa171e5fb9d7e2c0f1535b487421/carefree-drawboard-0.0.3a0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-16 02:07:25",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "carefree-drawboard"
}
        
Elapsed time: 2.38613s