Skip to main content

A package for validating file paths across different operating systems and storage services.

Project description

File Path Validator (FPV) 🚀

Welcome to File Path Validator (FPV)! This Python package provides a robust solution for validating file paths across different operating systems and cloud storage providers, ensuring that your paths are safe and compliant with the respective file system rules. 🖥️✨

Features 🌟

  • Cross-Platform Support: Validates file paths for Windows, macOS, and Linux.
  • User-Friendly Error Messages: Easy-to-understand error messages for non-tech-savvy users.
  • Customizable Validation: Supports various file name restrictions and length limitations.

Supported Platforms 🖥️

Operating Systems

  • Windows
  • macOS
  • Linux (Debian/Ubuntu)

Cloud Storage Providers

  • Box
  • Dropbox
  • Egnyte
  • OneDrive
  • SharePoint
  • ShareFile

Installation 📦

To install File Path Validator, clone the repository and install it using pip:

pip install file-path-validator

Usage 📖

from FPV import Validator  # Import the Validator class from the FPV package

path = "example/path/with/invalid<>characters"
validator = Validator(path, service_name="windows")  # Specify the service name and path

try:
    validator.check_if_valid()  # Validate the file path
    cleaned_path = validator.get_cleaned_path()  # Get the cleaned path
    print("Path is valid!")
    print(f"Cleaned path: {cleaned_path}")
except ValueError as e:
    print(f"Error: {e}")

Notes on os_sync

  • The os_sync parameter allows you to specify the operating system for additional validation checks.
  • If not provided, the validator will not default to any OS. Because it is possible in a lot of cloud storage systems to only read / write files to their systems without ever syncing up the file storage to an operating system.

Contributing 🤝

We welcome contributions! If you'd like to help improve File Path Validator, please fork the repository and submit a pull request.

Thank you for checking out File Path Validator (FPV)! Happy coding! 🎉

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-path-validator-2.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

file_path_validator-2.1-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file file-path-validator-2.1.tar.gz.

File metadata

  • Download URL: file-path-validator-2.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.12

File hashes

Hashes for file-path-validator-2.1.tar.gz
Algorithm Hash digest
SHA256 0c4d88c3d9f3546d3f3ff74ccdbf360d9a1f0b29f8beb859da2e75e0bcd54413
MD5 888cbaad8ae1f942c7dd35c7824fb51d
BLAKE2b-256 6f16be995e004a814555771bec98a444d0480469e66cd26f951636325cf1f90c

See more details on using hashes here.

File details

Details for the file file_path_validator-2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for file_path_validator-2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 508b85bb10df0744ed52dabc122fccf7884fd18e615683bea21ee3dace23a57c
MD5 c0e24a29179f5324bb98a564299490e0
BLAKE2b-256 f387fe77692b7497e5e12132b41dafee886ee13171c9c91bdf657277ac317fba

See more details on using hashes here.

Supported by

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