Python script - Read data records from a folder & send to a server
- or -
Post a project like this3801
$$
- Posted:
- Proposals: 9
- Remote
- #333571
- Awarded
Description
Experience Level: Intermediate
Estimated project duration: 1 day
Overview
We require a python script that can be run on both windows or linux pcs. The script will need to read in a URL and unique id from a file and then use GET requests to send data stored in a folder.
The top level directory the script is required to work with will be either an sdcard or a folder on the hard drives file system.
It will contain two folders of interest.
In the first folder will be a file containing the necessary details for sendiing the request.
In the other folder will be files (possibly several hundred thousand) containing binary data each named with a unix time stamp. A short script will be provided for extracting data from these files.
The script must do the following:
1. Open the config file and extract the hostname, page (max 40 characters) and unique site id (12 characters, numbers and letters)
2. Open the first file found in the data folder, and store the filename
note: file corruption may mean a file is not named with a 10 digit unix time stamp, this will need to be checked for and the script will need to return with an informative error.
3. Extract data using python code which will be provided
4. The following GET message with from the info from the config file and the extracted data
The data field could be up to 600 characters long.
5. This request must then be sent to the server at the extracted hostname address
6. Once a 200 OK is received from the server, the file can be deleted and then loop back to 2. to check for more files.
7. Once the folder is empty then the script can exit, providing the number of files sent as well as any other errors or relevant info.
All relevant info and details will be provided on acceptance of the job.
We require a python script that can be run on both windows or linux pcs. The script will need to read in a URL and unique id from a file and then use GET requests to send data stored in a folder.
The top level directory the script is required to work with will be either an sdcard or a folder on the hard drives file system.
It will contain two folders of interest.
In the first folder will be a file containing the necessary details for sendiing the request.
In the other folder will be files (possibly several hundred thousand) containing binary data each named with a unix time stamp. A short script will be provided for extracting data from these files.
The script must do the following:
1. Open the config file and extract the hostname, page (max 40 characters) and unique site id (12 characters, numbers and letters)
2. Open the first file found in the data folder, and store the filename
note: file corruption may mean a file is not named with a 10 digit unix time stamp, this will need to be checked for and the script will need to return with an informative error.
3. Extract data using python code which will be provided
4. The following GET message with from the info from the config file and the extracted data
The data field could be up to 600 characters long.
5. This request must then be sent to the server at the extracted hostname address
6. Once a 200 OK is received from the server, the file can be deleted and then loop back to 2. to check for more files.
7. Once the folder is empty then the script can exit, providing the number of files sent as well as any other errors or relevant info.
All relevant info and details will be provided on acceptance of the job.
Simon C.
99% (32)Projects Completed
33
Freelancers worked with
33
Projects awarded
39%
Last project
13 Feb 2017
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies