Htag

Latest version: v0.113.0

Safety actively analyzes 681866 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 35

0.113.0

minor evolution :
The PyScript Runner don't need anymore the "js.window" ! So, its `run()` method look likes others ;-)

now you can run your App in a pyscript/html page like this :
python
from htag.runners import PyScript
PyScript( App ).run()

BTW, the run() method is retro compatible with old ways.

0.112.0

The websocket is now initialized with "//<host>", and don''t try anymore "ws://<host>" or "wss://<host>". Now it uses the js mechanism to set the websocket ssl or not, depending on ssl or not.

It's a lot simpler (like in old days of v0.103), and a lot more robust in all cases ;-)

0.111.2

a little fix ;-)

0.111.1

Fix for compatibily with py<3.9

0.111.0

Add real argument parser in command line, see :

$ python3 -m htag -h
usage: htag [-h] [--host HOST] [--port PORT] [--gui | --no-gui] [--dev | --no-dev] [file]

Entrypoint to help you <to create> or <to run> a htag'app. If a [file] is given: it will try to run it (using dev mode), else it will create an empty htag file. The options are just
here for the run mode.

positional arguments:
file if present, the htag'file will be runned (reload/debug mode)

options:
-h, --help show this help message and exit
--host HOST Host listener (default: 127.0.0.1)
--port PORT Port number (default: 8000)
--gui, --no-gui Automatically open interface in a browser (default!)
--dev, --no-dev Run in dev mode (reload+debug) (default!)

0.110.0

The "Runner" now try to connect to websocket using "ws://" (first), and fallback to "wss://" (second).
Thus, this new Runner should work OOTB on repl.it, idx.dev or glitch.com, without the need of htagweb.

On theses platforms, the webserver is over SSL. So you'll need to use htagweb, where you can force the socket to use SSL with an option. But you'll need to explicitly force the server to use one or the other. (BTW it makes sense to use htagweb if you want to serve your app for many different users ... htag default runner is only for one user at a time)

Now, the default htag "Runner" should work, because it will implicitly try one and fallback to the second.

By default, it try "ws://", because the goal of the default Runner, is for desktop/android app, where SSL is not mandated (one client, one server). But now, it should work implicitly OOTB in a ssl webserver context.

(Perhaps, in the future, htagweb will introduce the same kind of mechanism ... but now, you should explicitly define it in the htageweb runner ... but I don't wanted to add this kind of option in the default htag Runner ... KISS first!)

**UPDATE** :

- it's validated https://idx.google.com/ : it works now OOTB ;-)
- the trouble seems more complex for repl.it ;-( ... need to dig that

Page 1 of 35

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.