Submit a job to a web server using python

Asked 2 years ago, Updated 2 years ago, 13 views

Hello, everyone I'd like to create an automated Python code that submits the desired action to the following web server (http://biophysics.cs.vt.edu/), is there a separate Python package that I use? Even if I google it, only search results such as making a blog with flask come out...;;;

python

2022-09-20 17:10

1 Answers

To "submit the work you want" would simply be to submit a specific form. You just have to send a specific HTTP POST request and you don't have to do it in Python.

For example, if you want to use the "upload a structure file" part of the Process A Structure menu, the source of the form is like this:

<!-- Leave the essence and omit everything you don't need -->
<form enctype="multipart/form-data" action="uploadpdb2.php" method="post">
    <input name="userfile" type="file">
    <input type="submit" value="Process File">
</form>

You can do the CURL operation for the next signature.

curl-F 'userfile=@/specific/path/file.pdb' http://biophysics.cs.vt.edu/uploadpdb2.php

I think we can use the requests module on Python. Try it!


2022-09-20 17:10

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.