Falcon v3.0.0-b1 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1028 页 | 725.86 KB | 1 年前3
Falcon v3.0.0 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1055 页 | 739.30 KB | 1 年前3
Falcon v3.0.1 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1058 页 | 741.59 KB | 1 年前3
Falcon v3.0.0-b2 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\. [a-z]{2,4}$' def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 1041 页 | 730.21 KB | 1 年前3
Falcon v1.0.0 Documentationmiddleware with Falcon? Instances of falcon.API are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware falcon.routing.compile_uri_template(template)[source] Compile the given URI template string into a pattern matcher. This function can be used to construct custom routing engines that iterate through a list can now be specified when calling Request.get_param(). This provides an alternative to using the pattern: value = req.get_param(name) or default_value Friendly constants for status codes were added (e0 码力 | 249 页 | 406.22 KB | 1 年前3
Falcon v0.2.0 Documentationmiddleware with Falcon? Instances of falcon.API are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware falcon.routing.compile_uri_template(template)[source] Compile the given URI template string into a pattern matcher. This function currently only recognizes Level 1 URI templates, and only for the path portion else: params = {} resource = None for pattern, sink in self._sinks: m = pattern.match(path) if m: params = m.groupdict()0 码力 | 188 页 | 358.44 KB | 1 年前3
Falcon v1.0.0 Documentationmiddleware with Falcon? Instances of falcon.API are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware falcon.routing.compile_uri_template(template)[source] Compile the given URI template string into a pattern matcher. This function can be used to construct custom routing engines that iterate through a list can now be specified when calling Request.get_param(). This provides an alternative to using the pattern: value = req.get_param(name) or default_value Friendly constants for status codes were added (e0 码力 | 312 页 | 368.58 KB | 1 年前3
Falcon v3.1.1-b3 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[a-z]{2,4}$' ) def return name def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path, name) middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-b1 Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[a-z]{2,4}$' ) def return name def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path, name) middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 378 页 | 1.29 MB | 1 年前3
Falcon v3.1.1-a Documentationcontent_length = self._image_store.open(name) class ImageStore: _CHUNK_SIZE_BYTES = 4096 _IMAGE_NAME_PATTERN = re.compile( '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\.[a-z]{2,4}$' ) def return name def open(self, name): # Always validate untrusted input! if not self._IMAGE_NAME_PATTERN.match(name): raise IOError('File not found') image_path = os.path.join(self._storage_path, name) middleware with Falcon? Instances of falcon.App are first-class WSGI apps, so you can use the standard pattern outlined in PEP-3333. In your main “app” file, you would simply wrap your api instance with a middleware0 码力 | 378 页 | 1.29 MB | 1 年前3
共 40 条
- 1
- 2
- 3
- 4













