3 # Autogenerated by Thrift
5 # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
9 from __future__
import print_function
10 from __future__
import absolute_import
15 if (not sys
.argv
[0].endswith("par") and
16 not sys
.argv
[0].endswith("xar") and
17 os
.getenv('PAR_UNPACK_TMP') == None):
19 f
= open(sys
.argv
[0], "r")
21 f
.readline() # This will be #!/bin/bash
25 # The par generator tool always has '# This par was made' as the
26 # second line. See fbcode/tools/make_par/make_par.py
27 if (not line
.startswith('# This par was made')):
29 You are trying to run *-remote.py which is
30 incorrect as the paths are not set up correctly.
31 Instead, you should generate your thrift file with
32 thrift_library and then run the resulting
34 For more information, please read
35 http://fburl.com/python-remotes""")
38 from . import DbMixedStackArguments
41 from thrift
.util
.remote
import Function
42 from thrift
.remote
import Remote
45 'getDataByKey0': Function('getDataByKey0', 'DbMixedStackArguments', 'binary', [('string', 'key', 'string')]),
46 'getDataByKey1': Function('getDataByKey1', 'DbMixedStackArguments', 'binary', [('string', 'key', 'string')]),
49 SERVICE_NAMES
= ['DbMixedStackArguments', ]
51 if __name__
== '__main__':
52 Remote
.run(FUNCTIONS
, SERVICE_NAMES
, DbMixedStackArguments
, ttypes
, sys
.argv
, default_port
=9090)