pathlist
pathlist: A Python library that extends
pathlibwith enhanced path manipulation and directory listing capabilities. Easily navigate, query, and manipulate file system paths with added convenience and flexibility.
Features:
- Enhanced
Pathclass with additional methods for easy path manipulation. - Customizable and human-readable directory listing with filtering options.
- Support for recursive file and directory exploration.
- Intuitive and Pythonic interface, compatible with existing
pathlibusage.
Installation:
pip install pathlist
Quick Start:
from pathlist import Path
# Create a Path object
path = Path('/some/directory')
# List files in the directory
print(path.ls())
# Recursively list all files in the directory and its subdirectories
print(path.rls())
# Check if a certain part exists in the path
print('folder_name' in path)
# Change parts of the path
new_path = path.change('old_folder', 'new_folder')
Usage Examples
List Directory Contents
from pathlist import Path
# List all items in the current directory
print(Path().ls())
"""
(#7) [Path('LICENSE'),
Path('setup.py'),
Path('src'),
Path('dist'),
Path('README.md'),
Path('test'),
Path('build')]
"""
List Files with Specific Extension
from pathlist import Path
# List all files with the .py extension in the current directory
print(Path().rls('.py'))
"""
(#7) [Path('setup.py'),
Path('src/pathlist/__init__.py'),
Path('src/pathlist/__pycache__/__init__.cpython-310.pyc'),
Path('src/pathlist/__pycache__/path.cpython-310.pyc'),
Path('src/pathlist/path.py'),
Path('build/lib/pathlist/__init__.py'),
Path('build/lib/pathlist/path.py')]
"""
Get Directory Tree Structure
from pathlist import get_directory_tree
# Print the directory tree structure for the src directory
print(get_directory_tree('src/'))
"""
|--[D] src
|--[D] pathlist
|--[F] __init__.py
|--[D] __pycache__
|--[F] __init__.cpython-310.pyc
|--[F] path.cpython-310.pyc
|--[F] path.py
|--[D] pathlist.egg-info
|--[F] PKG-INFO
|--[F] SOURCES.txt
|--[F] dependency_links.txt
|--[F] top_level.txt
"""
About the Project:
PathList is designed to provide developers with a more powerful and flexible way to work with file system paths. By extending Python's built-in pathlib, PathList adds new features like directory listing with filtering, easier path manipulation, and more. It's perfect for developers who need more control and convenience when handling file paths in their projects.
Metadata
Release files for pathlist 0.1.1
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 | Actions |
|---|---|---|---|---|
| pathlist-0.1.1.tar.gz | 9.9 kB | Without provenance | Details for pathlist-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pathlist-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for pathlist-0.1.1-py3-none-any.whl |
Total release size: 17.6 kB
Release files / pathlist-0.1.1.tar.gz
| Download URL | pathlist-0.1.1.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11ddf7a5965e87f21f2a3bc9d1c301dcca88801e0e556db6443806f838d20b24
|
|
BLAKE2b-256 checksum How to use checksums |
d0ac1c12fce04eb2211594c7e35b792c3221706e1f9cd1be12eec53735ce4e31
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / pathlist-0.1.1-py3-none-any.whl
| Download URL | pathlist-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6b8eaa63d322ab79ba7e768971dca3a5c3badd265317791201a4321283ba646
|
|
BLAKE2b-256 checksum How to use checksums |
020b7e98d1381dd62a6d12bf3646eaeb8f3c42271e4a3a92b717095d28fa7663
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for pathlist 0.1.1
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.