title: Sending data from clients to server
body: <p>I have to complete a programming project at college and I have decided on a project that will require multiple clients (raspberry pis) to interact with a central server.</p>
  
  <p>Essentially, the server will store a database of people each with a unique vector. Then, a raspberry pi will send a vector to the server and the server will then determine which vector it is closest to out of the ones it has stored in that database, and then it will update a status database accordingly.</p>
  
  <p>A web application will display the live status of certain variables in the status database, and people should be able to login to the web application (but that doesn't need to be achieved now, giving anyone on the local network access to it for now is fine).</p>
  
  <p>I'm just not quite sure how to set this up. I have already made the web application in flask and at the moment it is running locally but I think I can make it accessible on the whole network by changing the host to 0.0.0.0.</p>
  
  <p>I have also written the code to take multiple vectors as input and then check them all and update the database accordingly. However, I am not yet sure how to send the vectors from the Pi to the server.</p>
  
  <p>Since it is still in the development phase at the moment, my PC will be the server and I'll be using a single Rasperry Pi 3B as a client.</p>
  
  <p>I was thinking I might need to send a POST request from the Pi to the server and I can do that since I have experience with python requests, although I wouldn't know how to configure it to send it to the server and then have the server read it and execute the code to analyse the vector(s).</p>
  
  <p>So I was essentially just wondering if someone could help me tie all of this together, and if you have any suggestions for anything I should change or add then that would be very helpful. If anything is unclear then please let me know and I'll try and clarify.</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: Seems like I probably need an API on my server and then I send a POST request to <a href="http://MY_PC_IP/" rel="nofollow noreferrer">http://MY_PC_IP/</a>{api} and then somehow get that data into Python so I can run my code with it?</p>