pathpilot
pathpilot is a Python package that makes file and folder manipulation simple and intuitive.
Installation
pip install pathpilot
Main Features
file_factory→ Function that routes new file instances to the appropriate child class. Some file types are supported natively such as: .xlsx, .csv, .txt, .parquet, etc. The mapping of file extensions to their child class counterparts is managed using theconfig.extension_mappingdictionary. Unmapped extensions are routed to theFilebase class by default.Folder→ Class that handles folder operations. It is important to be mindful of theread_onlyparameter which, ifTrue, allows folders to be created or deleted.
Example Usage
Please note the examples below represent a small fraction of the functionality offered by pathpilot. Please refer to the intra-code documentation more information.
Imports
from pathpilot import Folder, file_factory
Folders
Create a Folder instance. Passing read_only=False will create the folder if it does not already exist.
# initiate a folder instance
folder = Folder(r'C:\Users\MyID\Documents\MyFolder', read_only=False)
The join method is used to access subfolders. If read_only=False, the subfolders are created automatically.
# create subfolders (i.e. C:\Users\MyID\Documents\MyFolder\Year\2025\Month\)
month_folder = folder.join('Year', '2025', 'Month')
Alternatively, you can access subfolders by attribute.
# create a new subfolder called "January" by accessing it via attribute
january_folder = month_folder.january
Joining to a file name will return a file object instead.
new_years_file = january_folder.join('Happy New Year.txt')
Files
Create an instance of the ExcelFile class using the file_factory function. This occurs automatically by virtue of the .xlsx file extension.
# create ExcelFile instance
file = file_factory(r'C:\Users\MyID\Documents\MyFolder\MyFile.xlsx')
Next, let's check if the file exists. If not, let's save a pandas DataFrame as an Excel file.
# export a pd.DataFrame to the file, if it does not already exist
if not file.exists:
df = pd.DataFrame({'id': [1, 2, 3], 'data': ['a', 'b', 'c']})
file.save(df)
MyFile.xlsx:
• Wrote 72.00 B to sheet 'Sheet1' in 0.0 seconds.
• Wrote 80.00 B to sheet 'Sheet1' in 0.0 seconds.
Now let's read the file we created as a DataFrame.
# read the file we created as a pd.DataFrame
df = file.read()
On second thought, let's delete the file.
# delete the file we created
file.delete()
Metadata
Release files for pathpilot 0.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pathpilot-0.8.0.tar.gz | 54.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pathpilot-0.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 99.1 kB
Release files / pathpilot-0.8.0.tar.gz
| Download URL | pathpilot-0.8.0.tar.gz |
|---|---|
| Size | 54.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc4a7b855eec6cc8e39dbdd88e1b3d384f83e97d17b77d3085b9c717fe48d118
|
|
BLAKE2b-256 checksum How to use checksums |
9713501e406b44971cd8c7fed25d1bca9018658a680184e0c0c7cfc4dc59e630
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / pathpilot-0.8.0-py3-none-any.whl
| Download URL | pathpilot-0.8.0-py3-none-any.whl |
|---|---|
| Size | 45.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f88bfbdfc62fb415f0488df127ec54d9b4747766e1903ea49ca351560286857a
|
|
BLAKE2b-256 checksum How to use checksums |
e157785a902f6fcf950073e7ac4ff6d9b62f563fa394b2a9e15d32272f398eee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for pathpilot 0.8.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.