Skip to main content

A security utility library for cloud-based file storage applications

Project description

file-security-manager-akshitha

A Python security utility library developed for cloud-based file storage applications. Built as part of the Cloud Platform Programming module at NCI Dublin.

Installation

pip install file-security-manager-akshitha

Features

  • Generate unique file IDs using UUID
  • Hash file names using SHA-256
  • Get upload timestamps in ISO 8601 format
  • Validate file extensions against an allowed list
  • Validate file size (max 10MB)
  • Sanitize file names by removing unsafe characters
  • Build metadata dictionaries for DynamoDB storage

Usage

from file_security_manager import FileSecurityManager

# Generate a unique file ID
file_id = FileSecurityManager.generate_file_id()

# Validate file extension
is_valid = FileSecurityManager.is_valid_extension("report.pdf")  # True

# Sanitize a file name
safe_name = FileSecurityManager.sanitize_file_name("my file (1).pdf")  # my_file_1.pdf

# Build metadata for DynamoDB
metadata = FileSecurityManager.build_metadata(
    user_id="user-123",
    file_name="report.pdf",
    file_id=file_id,
    file_size=204800
)

Allowed File Types

.txt, .pdf, .png, .jpg, .jpeg, .gif, .csv, .docx, .xlsx, .mp4

Author

Akshitha Katakomula — NCI Dublin, MSc Cloud Computing 2026

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_security_manager_akshitha-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file file_security_manager_akshitha-1.0.0.tar.gz.

File metadata

File hashes

Hashes for file_security_manager_akshitha-1.0.0.tar.gz
Algorithm Hash digest
SHA256 a7c35178f3d2dd18a9ed1350049fa23c63606c59701de864dce26b30ae4e8856
MD5 913f46642d3c3587357029a3b9efe6e3
BLAKE2b-256 04e048642497b110d8fa70d28e02562a8a496152048bfd9cbf745a728248977d

See more details on using hashes here.

File details

Details for the file file_security_manager_akshitha-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for file_security_manager_akshitha-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 deb3d31b4cec094ce8f3467728f95bc33f1d852943586a4fdbf7c0b1406462a6
MD5 dfb952c4b145b8773ff05293a3b02b70
BLAKE2b-256 82fdd85d70e5f4dca05ee9d7eb8275b00eea4d5ce9fbcc79a2c96e8b1a0484a9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page