Falcon v1.0.0 Documentationprocess_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 application = falcon.API() That creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn expects it to be called, by let’s create a hook that will run before each request to post a message. Add this method below the definition of ALLOWED_IMAGE_TYPES: def validate_image_type(req, resp, resource, params): if req.content_type0 码力 | 312 页 | 368.58 KB | 1 年前3
Falcon v1.3.0 Documentationdef process_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 if req.content_length application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon 6.1. User Guide 35 Falcon Documentation, Release 1.3.0 from .images0 码力 | 146 页 | 535.22 KB | 1 年前3
Falcon v1.3.0 Documentationprocess_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon from .images import ImageStore, Resource def create_app(image_store):0 码力 | 194 页 | 266.90 KB | 1 年前3
Falcon v1.1.0 Documentationdef process_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 if req.content_length application = falcon.API() That creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn expects it to be called, by let’s create a hook that will run before each request to post a message. Add this method below the definition of ALLOWED_IMAGE_TYPES: 30 Chapter 6. Documentation Falcon Documentation, Release 1.1.0 def0 码力 | 113 页 | 426.53 KB | 1 年前3
Falcon v1.4.1 Documentationdef process_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 if req.content_length application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os (continues on next page) 5.1. User Guide 33 Falcon Documentation, Release 1.4.1.post-10 码力 | 158 页 | 587.88 KB | 1 年前3
Falcon v1.4.0 Documentationdef process_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 if req.content_length application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon 5.1. User Guide 33 Falcon Documentation, Release 1.4.0 from .images0 码力 | 156 页 | 573.94 KB | 1 年前3
Falcon v1.4.1 Documentationdef process_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 if req.content_length application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon 5.1. User Guide 33 Falcon Documentation, Release 1.4.1 from .images0 码力 | 156 页 | 574.46 KB | 1 年前3
Falcon v3.0.0-b1 Documentationprocess_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 application = falcon.App() This code creates your WSGI application and aliases it as app. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon from .images import ImageStore, Resource def create_app(image_store):0 码力 | 1028 页 | 725.86 KB | 1 年前3
Falcon v1.2.0 Documentationprocess_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon from .images import ImageStore, Resource def create_app(image_store):0 码力 | 177 页 | 252.56 KB | 1 年前3
Falcon v1.2.0 Documentationdef process_request(self, req, resp): # req.stream corresponds to the WSGI wsgi.input environ variable, # and allows you to read bytes from the request body. # # See also: PEP 3333 if req.content_length application = falcon.API() This code creates your WSGI application and aliases it as api. You can use any variable names you like, but we’ll use application since that is what Gunicorn, by default, expects it to this, modify app.py to add the ability to configure the image storage directory with an environment variable: import os import falcon from .images import ImageStore, Resource def create_app(image_store):0 码力 | 134 页 | 498.46 KB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













