Skip to main content

Provides syntax for working with strings in the context of file management.

Project description

QuickPathStr

Copyright (c) 2023 Sean Yeatts. All rights reserved.

This module provides syntax for working with strings in the context of file management. It's designed to reinforce a universal nomenclature by which files, their types, and their directories may be referred.

API Reference

The core of the API is captured within the Filepath class:

class Filepath:
# Deconstructs a complete filepath into its constituent elements
    def __init__(self, complete: str) -> None:
        self.complete   = complete                          # Ex: C:\Users\myself\Desktop\MyFile.txt
        self.directory  = str(Path(self.complete).parent)   # Ex: C:\Users\myself\Desktop
        self.name       = str(Path(self.complete).name)     # Ex: MyFile.txt
        self.root       = str(Path(self.complete).stem)     # Ex: MyFile
        self.extension  = str(Path(self.complete).suffix)   # Ex: .txt

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

quickpathstr-0.0.4.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

quickpathstr-0.0.4-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

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