Flask を使用して、ユーザーが解析してデータベースに入れる CSV をアップロードできる単一ページの Web サイトをホストすることを検討しています。データベースの悪ふざけはすべて完了し (別の Python スクリプトで SQLalchemy を使用)、スクリプトが CSV にアクセスできるようになったら、すべて解決しました。
シナリオは次のとおりです。
1. User directs browser at URL (probably something like
http://xxx.xxx.xxx.xxx/upload/)
2. User chooses CSV to upload
3. User presses upload
4. File is uploaded and processed, but user is sent to a thank you page while our
script is still working on the CSV (so that their disconnect doesn't cause the
script to abort).
CSV がサーバーに残されていればまったく問題ありません (実際、処理がうまくいかなかった場合に備えてバックアップがあるため、おそらく好まれます)。
私が欲しいのはソケットをリッスンするデーモンだと思いますが、これについてはあまり経験がなく、どこから構成またはFlaskのセットアップを開始すればよいかわかりません。
Flask 以外のフレームワークの方が簡単だと思う場合は、間違いなくお知らせください。
どうもありがとうございました!!