Thanks to the toil of the folks at conda-forge, you can try out PyPy, a fast alternative Python implementation.
Not everything is available yet, but the bot just keeps on migrating: there's still lots to do, so stay tuned!
There are many already existing powerful http servers that can be used in python e.g. gevent, twisted web server. However, they are a bit complex to use and you cannot start them in a thread other than the main thread. | |
Here is a sample of basic http server using "BaseHTTPRequestHandler". The example exposed two rest interfaces: | |
To ingest records into the web server | |
To retrieve already ingested records from the web server | |
The records are assumed to be JSON based, however, any type of records can be ingested. | |
[sourcecode language="python" wraplines="false" collapse="false"] | |
from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer |
Thanks to the toil of the folks at conda-forge, you can try out PyPy, a fast alternative Python implementation.
Not everything is available yet, but the bot just keeps on migrating: there's still lots to do, so stay tuned!