lsbaws | Let 's Build A Web Server | Websocket library
kandi X-RAY | lsbaws Summary
kandi X-RAY | lsbaws Summary
Source code for the three-part series of articles "Let's Build A Web Server".
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Serve HTTP requests
- Handle a request
- Serve forever
- Return a WSGI environment
- Handle a single request
- Finish the response
- Parse the request string
- Create a WSGI server
- Set the application
lsbaws Key Features
lsbaws Examples and Code Snippets
Community Discussions
Trending Discussions on lsbaws
QUESTION
I'm trying to extend an existing Python 3 application to include a REST API. I've been searching for several days trying to figure out how to make the REST API a subcomponent of the existing application, but the guides I'm finding for things like Flask, Eve, etc. don't show how to run a production API unless the API application itself is run directly.
I have successfully added a Flask REST API to my application and it responds as expected. However, it is running in a way that is unsupported and allegedly unsafe, at least according to the developers. A warning message is produced when I run my application suggesting I should be using a WSGI server instead:
...ANSWER
Answered 2019-Mar-10 at 15:59Your options depend on what you mean by "Making it a subcomponent of the existing application".
Currently you have a completely separate app, which you could run using common App Servers like Gunicorn (this article might help and this as well [mentioned by @roganjosh]).
If you want to extend your mature application to include this, the solution depends mostly on the existing app and the framework you're using - I'll try to help if you add more details.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install lsbaws
You can use lsbaws like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page