question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Over Christmas I am planning to put some hours into cleaning up Eel and pushing to a 1.0 release, which should be bug free and stable for a while.

I am opening this issue so that people can suggest/request features or design changes.

Stuff I can think of;

  • Renaming exposed functions. I think this is half implemented. You should be able to say eel.expose(actual_function, 'exposed_name').
  • First class Electron support.. It should be easy to use Electron as browser, not have to use ‘custom’.
  • Better packaging as standalone app. There seem to be a few issues people are having with pyinstaller. This process could be polished.
  • Better docs/tutorial/examples/wiki.
  • Jinja2 templates support. Have had PR sitting there for this for a while, I will integrate it

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:13
  • Comments:13

github_iconTop GitHub Comments

4reactions
brumarcommented, Dec 10, 2018

This is all I can think of. This is rather a long list, sorry about that. I hope my enthusiasm is not asphyxiating. If you are willing to discuss some points, maybe we could exchange on dedicated issues or create new ones to avoid polluting this thread. I worked on some of these items on my repositories so I can help on them if needed or submit precise PRs. I tried to order my list by decreasing order of priority.

  • Support python 3.7 => find what’s wrong with pyinstaller and the most recent gevent version
  • Support async and generators “return” values (both on js and python side) or indicate on the readme that it’s not supported at the moment.
  • Now, for what concerns iterators, maybe one should keep the “return me everything when it’s done” like I did on my repository, but providing a way to implement the iterator protocol instead of returning the whole list of values could be nice. so that, if, for example, eel.function is a generator on the js side, maybe one could process values one by one with something like that :
for i in eel.eelterator(eel.function(input)):
	print(i)

Instead of the classical version which would consume the whole iterator.

for i in function(input)():
	print(i)

But I don’t know how to achieve that since the values of “function” comes from another source. It seems to be a way to achieve this using RxPy and asyncio but that’s a lot to buy (https://github.com/ReactiveX/RxPY/blob/master/examples/asyncio/toasyncgenerator.py).

  • Setting timeout like with eel.set_timeout_js(timeout=5) would seem nice to me. Exposing an hook would be nice to eel.on_timeout_js(callback) would be nice too. maybe a decorator would be nice to get a “local timeout” with eel.timeout(12, raise_timeout_exception=True): But I think that would require to add a field in the call object, because with this async framework, I don’t know if this is right to mess with a global value temporally.
  • gives more control on the user for the parsing of static files (which is a bit brittle and implicit), or even remove entirely the parsing of static files, by getting this information ASAP from querying eel. I personally don’t like eel.expose(func, funcname) as funcname has no strong reasons to be another thing than func.name.
  • Use the logging library so that users can debug eel more easily.
  • Eel should be able to know about javascript errors, maybe by sending stuff to python with window.onerror (cf this one : https://stackoverflow.com/questions/11257330/error-logging-for-javascript-on-client-side). That would allow more efficient development and testing, as well as opening up the possibility of a dedicated hook to grab these errors like on_js_error(func).
  • For the development of Eel itself, I think that’s really cool to submit PR along with tests that deals with the feature and the bugfix. This ease the burden of testing manually if the PR is not buggy somewhere. I’d suggest to use :
    • selenium tests (with pytest maybe?)
    • getting a CI pipeline for the development (travis? Jenkins?)
  • On the documentation, maybe getting clearer or what can or can’t be passed from one side to the other (inputs must be JSON serializable I guess)
  • Hooks for objects that are not JSON serializable. eel.register_json_hook(MyClass, boundmethod).
  • Maybe drop the execs in init.py. I believe that setattr(sys.modules[__name__], funcname, func) would work equally well.
  • Raise an Exception if an exposed python function has the same name of an eel method.
  • Allow to use the await keyword on the python side. But hat would require to either replace bottle with another websocket friendly python async framework (Sanic maybe?) or to use aiogevent to get wrap gevent into asyncio API (https://github.com/2mf/aiogevent) but it seems a bit foggy.
  • debug interface in the browser (for example to know which functions are exposed and to manually call them)
  • Build an attractive example by stealing a nice looking frontend somewhere.
2reactions
ChrisKnottcommented, Dec 8, 2019

What is your obsession with high quality code 🤣.

I originally wanted to get breaking API changes out quickly to minimize disruption, but user growth is fairly steady https://pypistats.org/packages/eel so I don’t think there’s any rush, and it is better to take the time to make structural changes if it will allow long term health of the project.

Read more comments on GitHub >

github_iconTop Results From Across the Web

EEW Nano 1.0 - Dreaming Robots
The Electric Eel Wheel Nano is an affordable spinning wheel in a travel-friendly package. Its smooth and quiet operation will help you spin...
Read more >
Eel 1.0.0a1 - PyPI
Eel is a little Python library for making simple Electron-like offline HTML/JS GUI apps, with full access to Python capabilities and ...
Read more >
Eel ringer version 1.0 by vulume on maxforlive.com
Works great on droning chords. Ring modulates the input with a phase shifted version of itself. An allpass filter flips the phase 180°...
Read more >
eel | RubyGems.org | your community gem host
eel 1.0.3 · Total downloads 72,049 · For this version 37,703 · Gemfile: = Copy to clipboard Copied! · install: = · Licenses:...
Read more >
Eel 1.0 · Issue #88 · python-eel/Eel - GitHub
Over Christmas I am planning to put some hours into cleaning up Eel and pushing to a 1.0 release, which should be bug...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found