Jump to content

Recommended Posts

Posted

Hi there, I'm in Johnny server. I followed how to start flask app in the server. I'm just wondering how to import function from the cloudapi.py to the myapp.py, for example:

 

file: myapp.py

 

from cloudapi import *

 

 

Structure of the folder in

/home/mowaseem/public_html/flask/

                    |

                    |_____ .htaccess

                    |

                    |_____ cloudapi.py    

                    |

                    |_____ flask.wsgi

                    |

                    |_____ myapp.py

                    |

                    |_____ settings.conf

 

 

  • 2 weeks later...
Posted

Hi there, I'm in Johnny server. I followed how to start flask app in the server. I'm just wondering how to import function from the cloudapi.py to the myapp.py, for example:

 

file: myapp.py

 

from cloudapi import *

 

 

Structure of the folder in

/home/mowaseem/public_html/flask/

                    |

                    |_____ .htaccess

                    |

                    |_____ cloudapi.py    

                    |

                    |_____ flask.wsgi

                    |

                    |_____ myapp.py

                    |

                    |_____ settings.conf

 

 

I think you just write

 

import cloudapi

 

at the top of the myapp.py. Then you can call cloudapi.function() in myapp

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...