Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ffig internals from flask API #15

Open
petr-tik opened this issue Apr 16, 2018 · 0 comments
Open

Remove ffig internals from flask API #15

petr-tik opened this issue Apr 16, 2018 · 0 comments

Comments

@petr-tik
Copy link
Member

Currently copying too much ffig.main function into the request handler. As soon as ffig exposes an endpoint, use that and remove calls to main ffig

ffig_subfolder = '/home/ffig/ffig/'
template_dir = os.path.join(ffig_subfolder, 'templates')

env = ffig.FFIG.set_template_env(template_dir)

template = env.get_template("py3.tmpl")

m = ffig.FFIG.build_model_from_source(
    "filename.hpp", mod_name, [("filename.hpp", inp_file)])
classes = m.classes
api_classes = ffig.FFIG.collect_api_and_obj_classes(classes, 'FFIG:EXPORT')
output_string = ffig.generators.render_api_and_obj_classes(mod_name, api_classes, template)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant