What? FastAPI is certainly not single file: https://github.com/tiangolo/fastapi/tree/master/fastapi
The issue is talking about Bottle the framework itself being a single file, bottle.py.
Re:Why should bottlepy stick to a file?
by sandGorgon on Saturday January 11, 2020 @03:44AM
(#22018932)
oh my bad. That's interesting, but im not sure about utility.
Because everyone literally uses package management to install and maintain bottle.
Bottle has code like this - https://github.com/bottlepy/bottle/blob/master/bottle.py#L81... - which does check for external dependencies (which predicate a package manager)
not really.. it uses ujson if it is installed and falls back to the built in json. Hard to call something a dependency when you don't depend on it.
Re:Why should bottlepy stick to a file?
by rejschaap on Saturday January 11, 2020 @01:09PM
(#22021323)
Those are often called optional dependencies. Which is of course an oxymoron.
Re:Why should bottlepy stick to a file?
by Kwpolska on Saturday January 11, 2020 @03:43AM
(#22018931)
FastAPI and Starlette both have tons of files, and even subpackages. Bottle ships as only a single bottle.py file, with no external dependencies (only Python standard library). FastAPI depends on Starlette, and both have a set of optional external dependencies.
> However, it is a bit tricky to run Bottle with production grade servers like gunicorn/uwsgi.
Uh, no? Bottle has docs for deployment: https://bottlepy.org/docs/dev/deployment.html#switching-the-...
They have automated support for gunicorn. uWSGI requires adding one line (`app = bottle.default_app()`) and pointing uWSGI at that.
https://github.com/tiangolo/fastapi
or Fastapi for that matter - https://github.com/encode/starlette
However, it is a bit tricky to run Bottle with production grade servers like gunicorn/uwsgi.