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.2.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

file_path_validator-2.2-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for file-path-validator-2.2.tar.gz
Algorithm Hash digest
SHA256 7c628b89a8e06763a18b22b455393396bdceaf623b481adb9c4d69e97ce7c36f
MD5 d3577e16204f500a7dbfb2661a91817b
BLAKE2b-256 7cdc3526708db09b83a1d6eb5e9ad8d430b8e93cd637c04b8a71fe523d78f849

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for file_path_validator-2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c08f4535f03612bda8c57980bfbbf1238e9cd9f1c566d4f75e02fd0dc9d04d2e
MD5 a98859776488a210677234b6c836e6f7
BLAKE2b-256 37ff9e0942a2aeff44947e4628eaa9ba2adcd08be78dc8a5a4cb1b58720c743d

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