GithubHelp home page GithubHelp logo

dec-metrics-ltd-python-developer-for-simple-ftp-pull-script's Introduction

Python developer for simple FTP pull script

Table of Contents

...

Original Descripions

Task: Python developer for simple FTP pull script

Details

Python developer wanted to write a script for retrieving a file from a sFTP server. Here's a step-by-step:

  1. Connect to SFTP repository (Secure FTP)
  2. Identify files based on filename criteria
  3. Download these files to local folder
  4. Run an existing python script

Installation and usage

  1. source install.sh:

    . ./install.sh
    
  2. set up environment variables FTP_USER and FTP_PWD (or change the default value variable values in the script):

    export FTP_USER=...
    export FTP_PWD=...
    
  3. run download.py to download files and run a post processing script:

    . ./env/bin/activate
    ./download.py
    

Getting Help

./download.py -h
usage: download.py [-h] [-u USER] [-p PWD] [--host HOST] [--src SRC]
                   [--dst DST] [-s SCRIPT] [-P PREFIX]

Downloading and processing files from a SFTP server.

optional arguments:
  -h, --help            show this help message and exit
  -u USER, --user USER  SFTP user (default: decmetrics)
  -p PWD, --pwd PWD     SFTP user password (default: ********)
  --host HOST           SFTP host (default: 31.3.230.106)
  --src SRC             SFTP source directory (default: readings)
  --dst DST             Destination directory (default: readings)
  -s SCRIPT, --script SCRIPT
                        Post processing script (default: ./importfile.py)
  -P PREFIX, --prefix PREFIX
                        Source file name prefix (default: southend_airport)

dec-metrics-ltd-python-developer-for-simple-ftp-pull-script's People

Contributors

nad2000 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.