{"id":26949702,"url":"https://github.com/numerous-com/numerous-widgets","last_synced_at":"2025-04-02T22:17:23.019Z","repository":{"id":266094976,"uuid":"894458987","full_name":"numerous-com/numerous-widgets","owner":"numerous-com","description":"This repo contains code for Numerous widgets, patterns and tools to support developing apps in frameworks like Marimo and Panel. The widgets are built with AnyWidget and dependencies to app frameworks are sought kept to a minimum to ensure the best compatibility across frameworks.","archived":false,"fork":false,"pushed_at":"2025-03-25T14:34:49.000Z","size":5735,"stargazers_count":13,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-25T15:34:33.838Z","etag":null,"topics":["anywidget","app-development","python"],"latest_commit_sha":null,"homepage":"https://www.numerous.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/numerous-com.png","metadata":{"files":{"readme":"docs/README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-26T11:48:26.000Z","updated_at":"2025-03-25T14:34:52.000Z","dependencies_parsed_at":"2024-12-20T14:39:08.222Z","dependency_job_id":"31adf2d7-8044-49e2-b3d8-c9a1ce76bbd1","html_url":"https://github.com/numerous-com/numerous-widgets","commit_stats":null,"previous_names":["numerous-com/numerous-widgets"],"tags_count":85,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerous-com%2Fnumerous-widgets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerous-com%2Fnumerous-widgets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerous-com%2Fnumerous-widgets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/numerous-com%2Fnumerous-widgets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/numerous-com","download_url":"https://codeload.github.com/numerous-com/numerous-widgets/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246899655,"owners_count":20851899,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anywidget","app-development","python"],"created_at":"2025-04-02T22:17:22.359Z","updated_at":"2025-04-02T22:17:23.004Z","avatar_url":"https://github.com/numerous-com.png","language":"TypeScript","readme":"# Numerous Widgets\n\n[![pypi badge](https://img.shields.io/pypi/v/numerous-widgets)](https://pypi.python.org/pypi/numerous-widgets)\n[![Release workflow badge](https://github.com/numerous-com/numerous-widgets/actions/workflows/release.yml/badge.svg)](https://github.com/numerous-com/numerous-widgets/actions/workflows/release.yml) \n\nWelcome to the widgets project.\n\nThe project consists of widgets for use in Python apps, as well as python libraries for app state management and long running tasks.\n\nTo install the python package, run:\n\n```sh\npip install numerous-widgets\n```\n\nImport the package in your python app:\n\n```python\nimport numerous.widgets as wi\n```\n\nPrerequisites:\n\n- Python\n\nConsider creating a virtual environment:\n\n```sh\npython -m venv .venv\n```\n\n## Developing Numerous Widgets\n\nThe project is partly frontend for the widgets developed in typescript React, and partly python code to implement the widgets. All widgets are developed according to the AnyWidget framework (see https://www.anywidget.dev).\n\nThe frontend is developed in the `js` directory, and the python code is developed in the `python` directory.\n\nThe frontend is developed using Vite and React.\n\n### Installation of the development dependencies\n\nTo install the development dependencies, from the `python` directory, run:\n\n```sh\npip install -e \".[dev]\"\n```\n\nConfigure python environment by creating a .env file.\n\nCreate a `.env` file in the `python` directory with the following content:\n\n```\nWIDGET_ENV=production\nVITE_DEV_SERVER=http://localhost:5173\n```\n\n### Development using Marimo\n\nMarimo is a notebook-like interface for python code which can be used to create apps based on the widgets.\n\nTo install Marimo run:\n\n```sh\npip install marimo\n```\n\nYou can start developing the widgets by editing the `app.py` file in the `python/examples/marimo` directory.\n\nGo to the `python/examples/marimo/numerous` directory and run:\n\n```sh\nmarimo edit app.py\n```\n\nThis starts a development server and opens a browser window with the Marimo interface. From there you can inspect the widgets and experiment with them.\n\nNow you are setup to develop the Python side of the widgets. To develop the frontend, you need to run the development server, see below.\n\n### Development using Vite\n\nThe widgets are developed using Vite and React.\n\nTo install the development dependencies, from the `js` directory, run:\n\n```sh\nnpm install\n```\n\nPrerequisites:\n\n- Node.js\n- npm\n\nTo run the development server, from the `js/src` directory, run:\n\n```sh\nnpx vite\n```\nNow, to use the development version of the widgets in Python and Marimo, change the `WIDGET_ENV` in the `.env` file to `development`. This will make the Python code connect to the development server for the latest changes, so you can see the changes immediately by restarting the marimo notebook.\n\nThe widgets js folder are structured as React components, which are then imported in Widget.tsx files which wraps the AnyWidget React interface. This means you can use the Widgets in a standalone React app for testing and development as well.\n\n### Build\n\nThe Python package will use built JavaScript code from the `static` directory in production mode. When you have created a new widget you need to add it to the build scripts in the `build-widgets.ps1` and `build-widgets.sh` files.\n\nWhen you have changed the widget code, you need to build the JavaScript code again. The CI pipeline will build the JavaScript code when you push to the repository, but only if you have added the widget to the build scripts.\n\nTo build the JavaScript code, from the `js` directory, run:\n\nOn windows, run:\n```sh\nbuild-widgets.ps1\n```\n\nOn Linux/Mac, run:\n\n```sh\nbuild-widgets.sh\n```\n\nThe build scripts will generate mjs files in the python/numerous/widgets/static directory from where Python will load them if in \"production\" mode.\n\nTo use the built JavaScript code, change the `WIDGET_ENV` in the `.env` file to `production`.\n\nNow you are all setup to develop the widgets. Happy coding!\n\n## CI/CD\n\nThe project is configured to use GitHub Actions for CI/CD.\n\nThe pipeline will build the widgets and generate the mjs files. Create a new version using semantic versioning and push to the repository. Finally the Python package will be built and pushed to the pypi repository.\n\n## Docs\n\nThe docs are generated using mkdocs.\n\nTo run the docs, from the `docs` directory, run:\n\n```sh\nmkdocs serve\n```\n\nThis will start a development server and open a browser window with the docs.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumerous-com%2Fnumerous-widgets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnumerous-com%2Fnumerous-widgets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnumerous-com%2Fnumerous-widgets/lists"}