{"id":13500073,"url":"https://github.com/jonashaag/bjoern","last_synced_at":"2025-05-13T23:04:02.844Z","repository":{"id":826807,"uuid":"542089","full_name":"jonashaag/bjoern","owner":"jonashaag","description":"A screamingly fast Python 2/3 WSGI server written in C.","archived":false,"fork":false,"pushed_at":"2024-08-09T21:35:30.000Z","size":615,"stargazers_count":3023,"open_issues_count":33,"forks_count":189,"subscribers_count":80,"default_branch":"master","last_synced_at":"2025-05-10T16:07:36.272Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonashaag.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2010-03-01T23:46:47.000Z","updated_at":"2025-05-06T21:31:47.000Z","dependencies_parsed_at":"2024-11-25T22:45:48.930Z","dependency_job_id":null,"html_url":"https://github.com/jonashaag/bjoern","commit_stats":{"total_commits":441,"total_committers":45,"mean_commits":9.8,"dds":"0.15646258503401356","last_synced_commit":"25b14e5042f51eb869d6bfb67fe7e6213c9747ee"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashaag%2Fbjoern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashaag%2Fbjoern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashaag%2Fbjoern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonashaag%2Fbjoern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonashaag","download_url":"https://codeload.github.com/jonashaag/bjoern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253507111,"owners_count":21919151,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T22:00:50.861Z","updated_at":"2025-05-13T23:04:02.804Z","avatar_url":"https://github.com/jonashaag.png","language":"C","readme":"bjoern: Fast And Ultra-Lightweight HTTP/1.1 WSGI Server\n=======================================================\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n   :alt: Join the chat at https://gitter.im/jonashaag/bjoern\n   :target: https://gitter.im/jonashaag/bjoern?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge\n\nA screamingly fast, ultra-lightweight WSGI_ server for CPython 2 and CPython 3,\nwritten in C using Marc Lehmann's high performance libev_ event loop and\nRyan Dahl's http-parser_.\n\nWhy It's Cool\n~~~~~~~~~~~~~\nbjoern is the *fastest*, *smallest* and *most lightweight* WSGI server out there,\nfeaturing\n\n* ~ 1000 lines of C code\n* Memory footprint ~ 600KB\n* Python 2 and Python 3 support (thanks @yanghao!)\n* Single-threaded and without coroutines or other crap\n* Can bind to TCP `host:port` addresses and Unix sockets (thanks @k3d3!)\n* Full persistent connection (\"*keep-alive*\") support in both HTTP/1.0 and 1.1,\n  including support for HTTP/1.1 chunked responses\n\nInstallation\n~~~~~~~~~~~~\n``pip install bjoern``. See `wiki \u003chttps://github.com/jonashaag/bjoern/wiki/Installation\u003e`_ for details.\n\nUsage\n~~~~~\n\nFlask example\n-------------\n\n.. code-block:: python\n\n   from flask import Flask\n\n   app = Flask(__name__)\n\n   @app.route(\"/\")\n   def hello_world():\n       return \"Hello, World!\"\n\n   if __name__ == \"__main__\":\n       import bjoern\n\n       bjoern.run(app, \"127.0.0.1\", 8000)\n\n\nAdvanced usage\n--------------\n\n.. code-block:: python\n\n   # Bind to TCP host/port pair:\n   bjoern.run(wsgi_application, host, port)\n\n   # TCP host/port pair, enabling SO_REUSEPORT if available.\n   bjoern.run(wsgi_application, host, port, reuse_port=True)\n\n   # Bind to Unix socket:\n   bjoern.run(wsgi_application, 'unix:/path/to/socket')\n\n   # Bind to abstract Unix socket: (Linux only)\n   bjoern.run(wsgi_application, 'unix:@socket_name')\n\n   # Enable statsd metrics. See instrumentation.md for details.\n   bjoern.run(wsgi_application, host, port, statsd=...)\n\nAlternatively, the mainloop can be run separately:\n\n.. code-block:: python\n\n   bjoern.listen(wsgi_application, host, port)\n   bjoern.run()\n\n   # With metrics. See instrumentation.md for details.\n   bjoern.listen(wsgi_application, host, port)\n   bjoern.run(statsd=...)\n\nYou can also simply pass a Python socket(-like) object. Note that you are responsible\nfor initializing and cleaning up the socket in that case.\n\n.. code-block:: python\n\n   bjoern.server_run(socket_object, wsgi_application)\n   bjoern.server_run(filedescriptor_as_integer, wsgi_application)\n\n   # This needs manual compilation with `WANT_STATSD=yes`\n   bjoern.server_run(socket_object, wsgi_application, enable_statsd=True)\n\n.. _WSGI:         http://www.python.org/dev/peps/pep-0333/\n.. _libev:        http://software.schmorp.de/pkg/libev.html\n.. _http-parser:  https://github.com/joyent/http-parser\n","funding_links":[],"categories":["C","WSGI Servers","WSGI 服务器","WSGI Servers [🔝](#readme)","Http servers"],"sub_categories":["More"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashaag%2Fbjoern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonashaag%2Fbjoern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonashaag%2Fbjoern/lists"}