Sanic keyword execution script

Python app.py execute script
Python -m xx returns to the internal model.py.
Why can sanic start web services in the form of keywords?
I really want to know the internal principle.

I’m not sure at all what you are asking, and I have no frame of reference as to what code you are referencing. Please clarify your question and add some code snippets where possible.

Why can I use sanic keyword to run web services?
sanic xxx.app -host=0.0.0.0 --port=8080
I want to know the internal principle.

I want to make a cil tool.

I believe what they’re asking is how does Sanic do it such that it can be executed as a binary, without having to invoke Python to run it, and this is actually a question I had too, so looking forward to Adam’s answer!

Add a configuration when python is packaged into a pip installation package

1 Like

Ahh! Yes, it is an entry point.

1 Like

argparse — Parser for command-line options, arguments and sub-commands