[HN Gopher] PySheets - Spreadsheet UI for Python
___________________________________________________________________
PySheets - Spreadsheet UI for Python
Author : tosh
Score : 181 points
Date : 2024-04-27 12:51 UTC (1 days ago)
(HTM) web link (pysheets.app)
(TXT) w3m dump (pysheets.app)
| systemz wrote:
| Great idea, easy to use GUI for non-tech and Pandas for data
| oriented at same time.
|
| Is there some similar project but selfhosted? I would be
| uncomfortable with uploading health related data to external
| service.
| mackrevinack wrote:
| grist is sort of similar. its a spreadsheet/database hybrid
| that lets you use python for formulas, and they have a self-
| hosted option:
|
| https://www.getgrist.com/product/self-managed
| starkparker wrote:
| Heavy emphasis on "sort of"; it enforces data types on
| columns, which is a significant difference from both
| spreadsheets and pysheets. This enables/requires more
| database-like behavior and planning (which is great for a lot
| of applications), but importing spreadsheets is much less
| intuitive and spreadsheet competence won't get you very far.
|
| Grist's closer to "what if Access had an interface that was
| more like Excel". Pysheets is more like "what if Python data
| structures had a GUI that looked like Excel".
|
| To put it another way, I love Grist but _would not_ recommend
| people who are using spreadsheets to try to bring their
| spreadsheets into it. I also love pysheets and _would_
| recommend it for that usage.
| jurimasa wrote:
| Not exactly the same but Spyder IDE has very nice spreadsheet
| functionality for data. Maybe it works for you.
| laffra wrote:
| 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.
| bnc319 wrote:
| There's a cool one I've used called MitoSheet[0]. Runs locally
| and has some great features, though it doesn't support TSV
| files last time I checked. It's being actively developed still.
| I believe it was developed with YCombinator funding.
|
| [0] https://www.trymito.io/
| prashp wrote:
| What's the tech stack?
| nmstoker wrote:
| I think the underlying platform (built by that team) was posted
| here only a week or so ago... I'll see if I can find it
|
| EDIT: found it! LTK: https://github.com/pyscript/ltk
| laffra wrote:
| Browser > JS > WebAsm > PyOdide/MicroPython > PyScript > LTK >
| PySheets > Your Python.
| runningpig wrote:
| awesome
| laffra wrote:
| Thanks! - the author of PySheets
| echoangle wrote:
| For a non-browser python based spreadsheet application:
| https://pyspread.gitlab.io/
| benrutter wrote:
| This looks like a great and very polished project! Leveraging
| python in soeadsheets is a great idea - probably why excel are
| doing it already, but it's nice to see an implantation that's so
| clear and easy to use.
|
| It's hardly a criticism of pysheets specifically, but I _wish_
| spreadsheets were more restrictive (I.e. force sheets into a
| table format) so that people could build out spreadsheets in an
| org without creating an unholy mess that needs to be picked apart
| and reversed engineered in something that isn 't a spreadsheet.
| laffra wrote:
| 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.
| laffra wrote:
| The author of PySheets here: The app is written entirely in
| Python, running on PyScript, using PyScript-LTK, with two Python
| VMs, MicroPython and PyOdide. Web server is minimal logic,
| running on gunicorn on DigitalOcean. Storage is on Firestore. The
| App can be easily packaged up as a standalone, "on-prem" app, but
| I have not given that too much priority for now. Would love to
| hear what you all thing of writing web apps in the browser in
| Python.
| laffra wrote:
| 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.
| thomasfl wrote:
| Python is the new Excel. And now PySheets is the the Python.
| laffra wrote:
| :-)
| breckognize wrote:
| Shameless plug: If you have bigger data sets, check out
| rowzero.io.
|
| We implemented something like PySheets initially where the
| formula language was full Python. But we found the Python
| interpreter to be the bottleneck during (e.g.) large CSV imports,
| and the GIL prevented parallelizing evaluation. It was also
| harder for business users to adopt due to small syntactic
| differences between Python and the Excel formula language.
|
| So we implemented the spreadsheet engine and formula language in
| Rust. We have a Python code window that allows you to write
| arbitrary Python functions. Those functions can be called as
| formulas from any spreadsheet cell. We seamlessly marshall Pandas
| dataframes from Python land to spreadsheet land and back. It
| gives you 90% of the benefits of pure Python without compromising
| on performance.
| laffra wrote:
| 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 :-)
| breckognize wrote:
| Kudos on the technical achievement. We considered the thick
| client approach you're doing, and one of the reasons we
| punted was because it was so hard.
|
| One really nice thing about your approach is it minimizes
| infrastructure cost. That positions you well for embedding
| use cases, like New York Times visualizations, that we
| struggle to do economically.
|
| Best of luck!
| laffra wrote:
| Yes, my total development bill for EVERYTHING, including
| DigitalOcean, Google, and OpenAI is about $15.
| wslh wrote:
| Are Row Zero and/or PySheets open source?
| Keyframe wrote:
| nah, but it would be nice to have a communist version too.
| wslh wrote:
| That was not the point, there is a natural focus in HN
| towards open source software. Open source is not equal to
| Communism.
| laffra wrote:
| 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.
| mahoro wrote:
| This is awesome, and client-side Python is magic :-)
| laffra wrote:
| Thanks, much appreciated.
| stefanha wrote:
| Any chance of a video walkthrough or tutorial? I can't figure out
| what the workflow is and which use cases PySheets addresses from
| looking at the landing page. I don't want to register an account
| just to find out.
| laffra wrote:
| 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>.
| programmertote wrote:
| Very interesting software/app. My current company has a lot of
| Excel files with a lot of business logic embedded as Excel
| formulas in them. When we import Excel file to PySheets, does it
| also recognizes formulas in the original Excel file? Are there
| any videos that show what PySheet can do? Thank you.
| laffra wrote:
| 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.
___________________________________________________________________
(page generated 2024-04-28 23:00 UTC)