FutureFinity 0.2.0 Documentation¶
FutureFinity is an asynchronous Python web framework designed for asyncio and native coroutines. Benefit from the non-blocking model and asyncio, FutureFinity can handle thousands of requests at the same time.
The Source Code is hosted on GitHub.
import futurefinity.web import asyncio app = futurefinity.web.Application() @app.add_handler("/") class RootHandler(futurefinity.web.RequestHandler): async def get(self, *args, **kwargs): return "Hello, World!" app.listen(23333) try: asyncio.get_event_loop().run_forever() except KeyboardInterrupt: pass
The installation of FutureFinity is as sample as install other applications through pip:
pip install futurefinity
Install from GitHub master branch:
pip install git+git://github.com/futursolo/futurefinity.git
Install from source code:
tar xvzf futurefinity-(version).tar.gz cd futurefinity-(version) python setup.py install
If this is not a stable release of FutureFinity, please do unittest before you use it:
python setup.py test
If any tests failed, please report an issue.
FutureFinity 0.2.0 will only work on Python 3.5.1 or higher.
- Cryptograhy is the crypto library currently used by FutureFinity’s security features.
- Jinja2 is the template library currently used by FutureFinity’s template rendering.
Theoretically, FutureFinity can run on any system that supports asyncio. However, asyncio.SelectorEventLoop has a really low performance on windows and cannot handle over 512 handlers at the same time, and asyncio.ProactorEventLoop cannot support many features of asyncio. We recommend that running FutureFinity on Windows for only development use.
- FutureFinity Tutorial
futurefinity.web– FutureFinty Web
futurefinity.server– FutureFinity HTTPServer Class
futurefinity.client– FutureFinity HTTP Client
futurefinity.protocol– HTTP Protocol Implementation
futurefinity.routing– FutureFinity Path Routing
futurefinity.security– FutureFinity Cryptography Implementation
futurefinity.template– FutureFinity Template Wrapper
futurefinity.utils– FutureFinity Utilities