Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The singlefile-ness of Bottle is no longer unique. For example, the modern day Fastapi built on async ASGI (and ranks top in framework benchmarks) is also single file.

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.



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.


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.


Those are often called optional dependencies. Which is of course an oxymoron.


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.


It’s indeed strange to call any WSGI-capable framework (all of them?) tricky to deploy with gunicorn/uwsgi. All you need to do is expose the WSGI object.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: