Django with application [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
This is a beginner question. I post this here because I'm so lost that I realized I even don't know what to look for.
I'm a C++ developper and have a developed C++ app. On the other hand, I recently dug into web development and created a website using the Django framework, which I host on Heroku.
The flow of the website: a user enters input on the website, input files are uploaded to AWS S3 (I managed to get that working).
The part I'm lost: with the user input, I'd like to run the C++ app which I host on a Linux server (Codenvy). But I have no idea how to launch that application from the Django site which is served by Heroku. At least giving some keywords to enhance my web searches?

It sounds like what you need is to run a script on another server using python?
I'd suggest taking a look at Paramiko:
https://github.com/paramiko/paramiko/
It is a package to allow you to ssh into another machine and execute commands.

Related

Is it possible to create a PyQt web application? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 2 years ago.
Improve this question
I am currently working on a small Python script that is running on my local server. I want to create a Ui for it with Qt because i work a lot with qml. Is it possible to make a PyQt web application that i can access through my browser inside my network?
No.
Web apps and GUI programs are completely different beasts.
Usually,
GUI apps require just Python interpreter, your scripts, and proper GUI libraries. You access then from within your machine's operating system.
(Python) Web apps require Python interpreter, running Web server software and making of HTML/Python web pages instead of GUI components. Web page access happens (typically) from a browser environment, which might be local or remote.
While it is not impossible that somebody could have made libraries for showing Python GUI interfaces over the Web, it wouldn't make much sense, because it is usually much easier to just use some remote desktop software to access your machine and use native GUI.

Python Restful API [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have written a python script that will connect to the oracle database using cx_oracle and gets data and performs some action on it.
I want to expose this python script as a Restful API. In google, I read that using flask we can deploy a Python script as a Web service.
What I am not clear
The flask itself behaves like a server?
Can I deploy the python Webservice in the Web logic server?
I want to deploy this Webservice in production. How can I provide security to this?
In another site, I read using Connection, Swagger we can implement it.
I am actually written using flask, flask-jsonpify, flask-sqlalchemy, flask-restful.
Please suggest which packages i need to use to deploy it as WebService.
Let me know in case of any other details needed. Thanks in advance for your suggestions and guidance.
Vijay
The flask itself behaves like a server?
It can
Can I deploy the python Webservice in the Web logic server?
Not unless you are using Jython as WebLogic runs Java applications
I want to deploy this Webservice in production. How can I provide security to this?
See next point
In another site, I read using Connection, Swagger we can implement it.
See next point
I am actually written using flask, flask-jsonpify, flask-sqlalchemy, flask-restful.
Sounds like you've done some research into what packages you need. Maybe find more to get swagger and security figured out
Please suggest which packages i need to use to deploy it as WebService.
Refer point 1. flask is all you need to run the web server

Deploy Flask app on pythonanywhere.com [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have working simple blog. Code here - https://github.com/4doge/askMe
I already have account on pythonanywhere and Flask app. What i need now?
Specifically, what steps should I follow to get the code off github, onto pythonanywhere, and then make the blog site live on the Internet using pythonanywhere's service?
I think these would be the next steps to deploy the app:
open a console: go to pythonanywhere.com, click on Consoles and then on Bash
clone your app
git clone git#github.com:4doge/askMe.git
You go to pythonanywhere.com and click on Web
click on add a new web app. (delete the old one if you have a free plan and do not need the old one)
click through and in the last dialog step you can choose the path to your run.py
Now the app should be running. You can restart it and browse it.

Execute a python function on a server [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
it's my first question here so i'll try to be clear :)
I want to execute a python script on a server (I use pythonanywhere), this script is took from spawningtool. I succeed on the install and I'm able do execute it in a shell on the user interface.
The problem is that I want to execute it when a client ask ^^, here a classic situation :
The client send a file to the server
The server execute the script with the file in parameter
The server answer with a string
How can I do that ? (Does it have a link with Django,Bottle etc . . . ?)
PS : Python stuff is new for me so take in consideration that I'm a mobile dev with very few notion of python and web dev.
You're definitely going to have to learn a lot about web development to make that happen. Have a look at tutorials for Django, Flask or Bottle. Get an idea of how the web works and then apply it to your problem.

distribute deploy python web application [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm in the early phases of designing and implementing a python web project that i want to be able to easily distribute.
Coming from a primary PHP and Perl world i know how i would do the project in those lanuages but I am trying to find the best method for python.
Not sure if it matters, but I'm thinking of using django as the web framework, but still exploring other frameworks.
What i'm looking for is best practices to be able to bundle my application and have users just install it using pip.
Would i be able to package the wen application like that even if it using django or is that not the way its normally done? Would they instead just download the code and set it up like it was any other tar ball of code?
I tried searching around for this but i find mostly information on people deploying there own projects.
Thanks
Dan
The answer depends of the size of your project.
If it's a plugin that could be integrated to any web site, so probally just an app in the project, it's quite easy check the page of the django's doc
If it's a full websitethen it's a little bit more complicated, since a django project depends on multiple settings that could differ from one system to an other I usually see the project being installed from a tar ball.
I've seen packages like django-admintools bundle multiple apps in one package, but the user still need to create a basic django project.
From what I know a full project cannot be install only by PIP.. the user always need to setup settings and the webserver (apache or nginx).
I hope this helped you.

Categories

Resources