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
Release history Release notifications | RSS feed
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 details)
Built Distribution
File details
Details for the file quickpathstr-0.0.4.tar.gz
.
File metadata
- Download URL: quickpathstr-0.0.4.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e52088196e5bcab393568f3aa5e748de61366f2dd9cf151f2b10400380fe30ae |
|
MD5 | 83c03dd1c9c21bd428720c39ab1cc2b4 |
|
BLAKE2b-256 | 6fafb53047afaddaf9d113ecd1976c24b182807321694f068931423683da4479 |
File details
Details for the file quickpathstr-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: quickpathstr-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbf904d5d4f791bd670803197083540d2ec7b13f52ec13819ba12f0b69f1187d |
|
MD5 | 879d3be10a5f86c1d37566a6a3ad96a7 |
|
BLAKE2b-256 | 98904e489df214115c43f96cc088409f7358e0236b68dd2307e2951d8c56cc2f |