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 defaults to Windows checks, assuming the user primarily works in that environment.

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

Uploaded Source

Built Distribution

file_path_validator-2.0-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for file-path-validator-2.0.tar.gz
Algorithm Hash digest
SHA256 a9b0fa578c58e8a05129155980b21d095b0fb4cdd45753c090b41202825f426b
MD5 7f61a4e266407880cd76e93fb5c41e71
BLAKE2b-256 f6a08cd75dc43c2760f180956b7b491b2b2e110ac280d79f43c066dc4cd31cd2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for file_path_validator-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ae068b884f7ebaf62809cab33527313298b0ac261d73f6fca27a36d54b48c2e6
MD5 1b7ea83bcc723e0179fc554b14a65fc2
BLAKE2b-256 4903903ec232f5448e9c8c7e913e8510540fabb3a936572e35717cff2f0019d1

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