Better HN
topnewbestaskshowjobs
Log inSign up

laffra

72 karma · joined Jan 31, 2013 (13y ago) · 34 submissions

Submissions

comment 2y ago · link · parent

This impacts Chrome, Edge, and Brave. A fix is in the works, but will take time to make it through the Chrome/Edge/Brave build trains. Up to then, most websites that rely on PyScript crash randomly with an "Aw, Snap!" message.

2.

Chromium crashes due to a Worker/WASM race condition, impacting PyScript(issues.chromium.org ↗)

3 points · by laffra · 2y ago · 1 comment

comment 2y ago · link · parent

Also, check out PySheets (https://pysheets.app), which leverages PyScript to run Python logic in a spreadsheet UI, which is written entirely in Python. The PySheets UI uses LTK (https://github.com/pyscript/ltk), a fully client-side UI rendering library for PyScript.

comment 2y ago · link · parent

I tried that exactly with PySheets by implementing the sheet in Python itself, rethinking how Jupyter Notebook would look if it treated the data science problem as a dependency graph rather than a linear storytelling document. See https://pysheets.app

comment 2y ago · link · parent

Your second proposal looks like https://pysheets.app

comment 2y ago · link · parent

Felix's upcoming work is intriguing and would enable a much nicer integration of Python into the Excel ecosystem. The use of PyOdide and WASM enables execution of the Python logic on-device. The same tactic is used by PySheets and taken a bit more to the extreme by implementing the cell functions, but also the entire sheet UI and logic in Python. Check it out if you are approaching the space from the perspective of a Python programmer, rather than an Excel user. See https://pysheets.app

comment 2y ago · link · parent

You can load spreadsheets into Jupyter today. With Pandas or Polars, you can import CSV or Excel sheets quite easily. PySheets is reimagining what Jupyter Notebooks would look like if you use a DAG, not a linear execution flow.

Just like CoPilot or Sourcegraph's Cody is used in VS Code, PySheets uses OpenAI to suggest the Python code to write when the sheet contains a Pandas data frame of a certain shape. The AI accelerates figuring out what APIs to call and when. I myself find Matplotlib and Pyplot highly confusing, and a coding assistant that writes my code in this niche, makes me a lot more productive. It is cool to say, "Take the dataframe in E13 and generate an orange bar graph for it," and see the code generated.

comment 2y ago · link · parent

And it all runs in your own browser without needing any cloud kernels.

comment 2y ago · link · parent

Anaconda is also a heavy sponsor of PyScript. The https://pyscript.com website is an online IDE for quickly trying out PyScript and building a website. If you like PythonAnywhere, you will love pyscript.com as well.

comment 2y ago · link · parent

That's nice. I will do the same for PySheets, once the dust settles on the original launch.

comment 2y ago · link · parent

PySheets is not based on Rust. It is 100% Python.

comment 2y ago · link · parent

I am feeling pretty Okay now, indeed. I played golf today. It was on a Par3 course, so it only tested my short game. However, I scored -1, with almost a hole-in-one. I blame it on the success of PySheets :-)

comment 2y ago · link · parent

Thanks!

comment 2y ago · link · parent

If you sign up for PySheets, we give you 7 tutorials. Two explain how to use AI to import data, convert it to Dataframes, and visualize them using Matplotlib. The generated code is impressive and can help novice data scientists explore the Pandas and Pyplot APIs.

The AI is used to generate Python code, not to analyze or generate data in the sheet. I will clarify that on the landing page. Hopefully, that will inspire you to try it out.

This is a different Kurt Vile :-)

comment 2y ago · link · parent

PySheets has been designed to run on-prem and on GCP as well. The beta version you are looking at is just offered as a zero-install experimentation platform. We are actively talking with financial institutions, and both co-founders on the team, https://pysheets.app/#Team, have a long history in Finance, so we are very sensitive to all the (correct) points you make. We will look in more detail at your very helpful suggestions!

comment 2y ago · link · parent

You can do that today with PySheets. On the PySheets landing page, you can find a live example. The data comes directly out of a sheet that uses a service to convert metrics into charts. For example, one of the three charts shown on https://pysheets.app/#Traction is directly embedded as an iframe from https://pysheets.app/embed?U=uXNuCGO2JU1E5aL7zcOh&k=C12. If I rerun the sheet that produces the charts, the PySheets landing page updates automatically with the latest data.

comment 2y ago · link · parent

Most people will import external sheets using Pandas. It has numerous conversion methods for table-structured data sources, such as https://pandas.pydata.org/docs/reference/api/pandas.read_exc....

comment 2y ago · link · parent

Lots of blood, sweat, and tears. And MicroPython!

comment 2y ago · link · parent

Any PySheets sheet runs in the PyScript context and can access the JavaScript window and DOM. Therefore, you can use the browser to access the file system: https://developer.mozilla.org/en-US/docs/Web/API/FileSystem.

Alternatively, you could create a form to "upload" a specific file, but instead of uploading it, read the bytes from the PySheet's cell function.

comment 2y ago · link · parent

Try cut-and-pasting a sheet from Google Sheets to PySheets. It works quite well. At the moment, PySheets does not handle Excel functions. This is on our possible roadmaps, but we just did not get to it yet. I really only worked on PySheets for about 3 months, since resigning from my last job in February.

comment 2y ago · link · parent

Thanks, much appreciated.

comment 2y ago · link · parent

:-)

comment 2y ago · link · parent

Yes, I will do some videos in the coming week. I did an extended demo for the weekly PyScript FUN meeting, but it turned out it was not recorded <facepalm>.

comment 2y ago · link · parent

A major part is, in the form of Pyscript-LTK. I keep moving more of PySheets to LTK as I find reusable parts. I truly love open-source, but I am also trying to get some revenue for the months of work I spent on developing PySheets.

comment 2y ago · link · parent

Yes, my total development bill for EVERYTHING, including DigitalOcean, Google, and OpenAI is about $15.

comment 2y ago · link · parent

Rowzero is a better spreadsheet, while PySheets is a better Jupyter Notebook. Although they converge in certain aspects, their distinct target audiences set them apart. This divergence may create some overlap, but it also leaves ample room for user preference.

PySheets currently runs inside the browser, on top of WebAsm, and the limitations there are bigger than just Python's slowness. You have only 4G addressable memory, including the interpreter and libraries. Network bandwidth is also a limiting factor for client-side computation.

That said, PySheets can render a sheet based on a 50,000-row Excel sheet in 0.5s and needs about 20s to do a full end-to-end recompute run. There are limits to what you can do in the browser without using an external kernel that can run Polars on large datasets. But, I think most people will be fine with what PySheets can let them do.

Finally, as the author of PySheets I am honored that a "competitor" sees us as a threat. I am quite impressed by Rowzero myself. Nice work :-)

comment 2y ago · link · parent

The PySheets server runs anywhere, for example: my laptop, Google AppEngine, and DigitalOcean. I designed it with on-prem in mind, so that PySheets could be deployed at companies that do not want to share data with external services.

That said, only the data stored in the sheet itself is stored in PySheets. Most use cases will load data from another place, filter and convert it, and then render a result. Still, self-hosting would be an interesting use case.

comment 2y ago · link · parent

LTK, a Python library to create browser UIs, is part of the open-source PyScript project. See https://github.com/pyscript/ltk. Anyone planning to visit PyCon US in Pittsburgh, I will be in the Anaconda booth most of the time. See you there.

comment 2y ago · link · parent

I envisioned many of the use cases not to store data in the sheet, but to use PySheets as a better Jupyter Notebook: Import data, convert to Dataframes, massage, analyze, learn, and export. A good example is how I have a sheet that loads PySheets usage metrics, converts to dataframes, plots in graphs and then renders as live charts on the pysheets.app landing page.

comment 2y ago · link · parent

Thanks! - the author of PySheets
12