Skip to content

garrichello/script-007-tasks

Repository files navigation

Cool Web Server

Author is Igor Okladnikov.

Requirements

General

  • Support Python 3.7+
  • Use venv during the development
  • Program must work both on Linux and Windows
  • Specify directory to keep manage files via CLI arguments
  • Cover functionality using pytest
  • Deploy via Docker image (for those who is familiar with Docker)
  • Use logging module for logging

File Service

  • Avoid usage of dangerous values like ../../../etc/passwd
  • Support binary file content as well

Configuration

  • Read settings from CLI arguments
  • Read settings from env vars
  • Read settings from config file

Web Service

  • Specify web-server port via CLI arguments
  • Work independently without WSGI
  • Suit with RESTful API requirements
  • Use asynchronous programming concept (aiohttp?)
  • Use multithreading for downloading files
  • Partial file download (http range)

Crypto Service

  • Protect files by cryptography tools

Auth Service

  • Provide access to files via access policy
  • Keep users in database

Database

Connect to database and create database and user:

create database fileserver;
create user fsuser with encrypted password 'fspass';
grant all privileges on database fileserver to fsuser;

(or do it interactively via pgAdmin, for example)

Update config.ini.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages