widgetti / solara

A Pure Python, React-style Framework for Scaling Your Jupyter and Web Apps
https://solara.dev
MIT License
1.9k stars 139 forks source link

Split of Reactive variables and publish as standalone library #767

Open EwoutH opened 1 month ago

EwoutH commented 1 month ago

To have this noted in this repo, for tracking:

Ideally, solara's reactive variables (which are signals) would be its own library... :)

Originally posted by @maartenbreddels in https://github.com/projectmesa/mesa/issues/2176#issuecomment-2225465885

The basic idea is that Solara's hybrid push/pull system has value on it's own, and could be published as a standalone library.

It doesn't necessarily need a new repo, it can just be published from this repo, and Solara can keep using the git version in this repo. The only difference it that you put it as an additional, standalone package on PyPI.

EwoutH commented 1 month ago

I did a little search into alternatives, and it seemed there aren't many that are well maintained.

Seems there's room for a new player in town!

maartenbreddels commented 1 month ago

There is also https://pypi.org/project/psygnal/ but it's not a hybrid push/pull system like javascript signals (often are).

I know the owner of https://pypi.org/project/reactive and I asked if he's ok with transferring me the ownership (it's not being used).

EwoutH commented 1 month ago

That's really cool! Thanks for actively considering / working on this!

maartenbreddels commented 1 month ago

Also noticed https://pypi.org/project/signals

which is being worked on by @manzt and @rgbkrk

Ideally, we get a signals like standard/library in Python that solara uses or is compatible with. Looking at https://pypi.org/project/signals/0.1.0a4/ this is fully compatible API wise with what we have in mind, and also, the Jupyter notebook integration looks aligned with my version.

EwoutH commented 1 month ago

Thanks! Can I find the source code of signals anywhere? The new pre-release description on PyPI doesn't list a homepage, repo or anything in that regard.

rgbkrk commented 1 month ago

Good spelunking! We have not published it for broad use yet.

manzt commented 1 month ago

Yup, should be ready to share in the next week or so!

EwoutH commented 1 month ago

Thanks a lot for working on this! Very curious if you have anything to share at this point!