Skip to content

Vir2S/vsem-fms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VSem Async File System

🚀 Description

This project is an asynchronous file system built with FastAPI and Anyio, secured with API Key authentication.


📂 Getting Started

First, navigate to this service's directory:

cd vsem_fms

📦 Installation

pip install -r requirements.txt

⚙️ Environment Setup

Copy the example environment file:

cp .env.example .env

Update the .env file with your API key and other configurations:

API_KEY=your-api-key
STORAGE_PATH=./storage
LOG_LEVEL=INFO
MAX_FILE_SIZE=10
LOG_DIR=logs

SERVER_HOST=localhost
SERVER_PORT=5000


🚀 Running the Server

Run the server locally:

python app/main.py

🐳 Docker

> Note: Docker setup is now described in the project root README.
If you want to run the entire system with Docker Compose, please refer to that file.



🔐 Using the API Key

All requests must include the X-API-Key header. Example:

curl -X GET "http://localhost:5000/files/" -H "X-API-Key: your-api-key"

🔥 Key Features

  • 📂 Async file operations via anyio
  • 🔑 API Key authentication
  • 📜 Structured logging via loguru
  • 🛡 Middleware for request logging

📄 API Endpoints

Method Endpoint Description
POST /upload Upload a file
GET /files/{folder}/{subfolder} List all files
GET /files/{folder}/{subfolder}/{filename} Download a file
DELETE /files/{filename}/{folder}/{subfolder}/{filename} Delete a file

🔧 Author: Vitaly Sem 🚀