MCPcopy Create free account
hub / github.com/apache/arrow / application

Function application

python/pyarrow/tests/wsgi_examples.py:21–35  ·  view source on GitHub ↗
(env, start_response)

Source from the content-addressed store, hash-verified

19
20
21def application(env, start_response):
22 path = env['PATH_INFO']
23 members = path.split('/')
24 assert members[0] == ''
25 assert len(members) >= 2
26 root = members[1]
27 if root == 's3':
28 # See test_fs::test_uwsgi_integration
29 start_response('200 OK', [('Content-Type', 'text/html')])
30 # flake8: noqa
31 fs = pyarrow.fs.S3FileSystem()
32 return [b"Hello World\n"]
33 else:
34 start_response('404 Not Found', [('Content-Type', 'text/html')])
35 return [f"Path {path!r} not found\n".encode()]

Callers

nothing calls this directly

Calls 3

lenFunction · 0.85
S3FileSystemMethod · 0.80
encodeMethod · 0.45

Tested by

no test coverage detected