{{! Copyright (c) Meta Platforms, Inc. and affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. }}{{! Cython wrappers of the C++ service classes that were generated by thrift. By convention, service classes have a c in front of them to differentiate them from the Python classes, which have no differentiation. That allows the Python calling code to call into the code without any awkward prefixes or suffixes. This is a top-level file that gets imported by the CythonServices.pyx file. That file exposes Python wrappers of the services to the end user. }} {{> common/auto_generated_py}} from thrift.py3.server cimport ServiceInterface {{#program:includeNamespaces}} {{#hasServices?}} cimport {{#includeNamespace}}{{value}}.{{/includeNamespace}}{{> common/auto_migrate_prefix}}services as _{{#includeNamespace}}{{value}}_{{/includeNamespace}}services {{/hasServices?}} {{/program:includeNamespaces}} {{#program:services}} cdef class {{service:name}}Interface({{#service:extends}}{{#service:externalProgram?}}{{! }}_{{#service:py3Namespaces}}{{value}}_{{/service:py3Namespaces}}{{! }}{{service:programName}}_services.{{/service:externalProgram?}}{{service:name}}Interface{{! }}{{/service:extends}}{{! }}{{^service:extends?}}ServiceInterface{{/service:extends?}}): {{#service:functions?}} # these are to avoid weird Cython multiple inheritance issue {{/service:functions?}} {{#service:supportedFunctions}} cdef bint _for_cython_{{function:name }} {{/service:supportedFunctions}} pass {{/program:services}}