Replies: 1 comment
-
|
As far as I know, The Python code generator typically mirrors the schema structure, generating separate modules for tables, structs, enums, unions, and namespaces. This keeps the generated code organized and helps avoid naming conflicts, especially for larger schemas. If distributing a large number of generated files is inconvenient, a few possible workarounds are:
For example, a simple wrapper module could look like: from myschema.Foo import Foo
from myschema.Bar import Bar
from myschema.MyEnum import MyEnum
__all__ = ["Foo", "Bar", "MyEnum"]which gives consumers a single import location even though the generated code remains split across multiple files. I don't believe there is currently a |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, when I usin flatc to generate python api from the schema, there are a lot of python files generated(the structure is a little complex), is there a way that I can generate only one file containing all the APIs?
Beta Was this translation helpful? Give feedback.
All reactions