TWPY - A super minimal, lightweight, efficient TiddlyWiki editor in Python (looking for testers/feedback)

twpy was designed to be the best lightweight desktop GUI client for editing and managing TiddlyWiki files - simple, powerful, elegant, efficient.

Installation is as simple as:

pip install tiddlywiki

Two terminal commands are installed:

twpym for starting the twpy TiddlyWiki Manager. –verbose is an option. You can open TiddlyWiki files in the Editor from the Manager.

twpye for starting the twpy TiddlyWiki Editor. Requires –file your-tiddly-wiki-path.html argument. –verbose is also an option.

TiddlyWiki Manager

TiddlyWiki Editor

twpy on Github

Latest Release

twpy on PyPI

Python was chosen because of it’s highly reliable package manager pip. I wanted to do it in Ruby, but none of the Ruby webviews worked. The advantage of twpy over TiddlyDesktop is it’s only a few KB of Python, vs 170MB? for TiddlyDesktop plus 190MB for NW.js. It’s lightweight, like gedit. It doesn’t use a lot of system resources. And it runs on arguably the best package manager in the world, with a single install command from the terminal.

This thing works perfect on Ubuntu 22.04. I tried it on a very old 2015 mac with hardly any upgrades, and twpye worked perfect, but twpym had issues with the buttons. twpye will work where all else fails. This should be promoted as an option for anyone having trouble with TiddlyDesktop (it stopped working for me when I upgraded to ubuntu 22.04).

Looking for feedback, especially ubuntu, since that was the target. I don’t really have a recent windows installation so I may not be able to fix any issues on that platform. Mac is also iffy. But the bare minimum functionality (twpye) should work on ANY platform python is installed.

As always, use caution with new software. (That said, I am fairly confident in my programming abilities, as I have built android apps and Java desktop apps with millions of installs, and zero cases of lost data or anything like that.) For anyone with concerns about the code: It’s open source. Less than 300 lines of Python. See for yourself what is going on. That’s the ONLY way anyone can prove a program is safe or not, is to examine the code.



Note: This is @rzel’s first post and includes sharing code. Please be carful until @rzel reputation can be established.

Hi Rob, and Welcome to the talk.tiddlywiki forums.

Looks interesting and I expect a few users will be in a position to test this right away. Of course I expect you would be aware that this being your first post, including installable code It is necessary to ask people to be cautious.

Not withstand the above thank you very much for your contribution to the Community.

Perhaps you could outline how it will look to a user and the advantages on making use of your solution, so people are more informed and motivated to try your solution.

Thanks Again

I hope this isn’t an abuse of power, but I bumped your trust level so you can post this image. I would like to see a snapshot of what it looks like.

Like TW_Jones, I’m always a little wary of new, executable code, especially coming from a new user. We live in a very paranoid world.

I have Xubuntu 18, but for me TD works fine. Have you reported your problems with TD?

Anyways, welcome!

I reported problems with TiddlyDesktop on Ubuntu 22.04, but nothing amounted from it. That’s okay for me, because twpy would not exist if TD were working, and I think twpy is better, at least for my uses.

I updated the OP with a few advantages. TiddlyDesktop is I think 170MB, plus 190MB for the NW.js library. That’s a heck of a lot of bytes for something that is just supposed to save a html file. twpy is only a few kilobytes, and uses less system resources. Plus twpy installs with just a 1 line terminal command, using one of the most reliable package managers in the world, pip.


Interesting. The GitHub repo doesn’t contain any code? … Where is the python code?

The code is in the Master repo:

The “main” repo is used to host images for the site.

Thaks for the info. …
The package contains a defaultworkspacelist.html file. Is there a repo, with the source code to create that HTML file?

It seems there is no 3rd party JS library involved, which imo is a good thing. … except a hefty CSS framework. Do they support CSS tree-shaking, to make it smaller?


defaultworkspacelist.html is not generated by anything, it is created by hand. Which I guess is kind of a pain because you have to scroll past all the lines of the embedded library to get to the custom code.

I’m not sure I want to prune the CSS library at this stage in case there are further features that may rely on code that would otherwise be taken out. I also thought of putting the css library in a separate file, but I kind of wanted to keep with the single file spirit of TiddlyWiki. (A separate CSS file may still be the best alternative option.) I also thought of just linking to the JSDelivr of bulma.css, but wanted to remain usable in cases where internet is not available.

Thanks a lot for the ideas and feedback!

OK – I can see that.

I think, it would make sense to have the CSS lib in a separated file. There should be some readme info about version and origin. It would make it much easier to see where the customisation starts and it would make the review process much easier.

The custom CSS elements may be part of the main html file. No problem about that.

What I personally don’t understand with the CSS lib is, that is uses !important 537 times, to overwrite its own definitions – but that would be a completely different topic

I see. I would have complained about an external link, even if that is common these days :wink:

Looks interesting - I have a few questions:

  1. Can this be dockerized and served via a browser by any chance?
  2. Does this support an TW instance with stand-alone tiddlers?
  3. Are file system changes (e.g. adding a new tiddler) picked up automatically?

I have this idea of adding new tiddlers from a stand-alone app on mobile so not to load the whole wiki and just researching possibilities at this point.

It would be interesting to see if this can be packaged for OSX and Windows using PyInstaller and what the resultant file size would be.


That’s a good idea. Also, AppImage for Linux.

1 Like

Those are great ideas, but they are a little ahead of where twpy is at. It runs in a pywebview, not sure if that can be dockerized. I’m not really familiar with stand-alone tiddlers, is this a new TW feature? When a new tiddler is created, the file is automatically added to “the list” of other tiddlers in the twpy manager, although currently no further file change scanning is done.

1 Like

If you run the node.js version of TW, each tiddler is saved in it’s own file. One of the reasons that TiddlyDesktop is so big (I think), is that it includes the node components to allow serving wikifolders (where tid files are stored). I suspect that it is a feature of TD that is rarely used.

Depends, again, as a selfhoster I save a snapshot of my file-system once a day, which versions individual tiddlers. I can roll-back individual entries without having to roll-back the whole html file. It’s great from a data-consistency point of view for my use-case.

pywebview in docker - seems doable: docker-raspbian_pywebview/Dockerfile at master · nmaas87/docker-raspbian_pywebview · GitHub. In general I personally always prefer installing something as a docker container (e.g. I can see the number of people which downloaded it before (so I trust it more), I don’t have to deal with dependencies and I can easily backup my data and rebuild if needed) - so that will help you reach broader audiences. I can help you setup a docker image if you’d like - I’m already maintaining one with 77000 downloads. I’m by no means an expert, but happy to support open-source projects :slight_smile: I would be even more happy to help if you consider my feature requests :smiley: :wink: