Directory Info Extractor
A lightweight Python library for extracting comprehensive information from directories. It provides an easy way to retrieve project structure and file contents, with customizable inclusion and exclusion patterns. Ideal for project analysis and documentation.
Installation
You can install the Directory Info Extractor using pip:
pip install directory-info-extractor
Usage
Here's a quick example of how to use the Directory Info Extractor:
from directory_info_extractor import get_directory_info
info = get_directory_info(
"/path/to/your/directory",
include_patterns=["*.py"],
exclude_patterns=["*.pyc", "__pycache__"],
recursive=True
)
print(info)
Features
- Retrieve project structure
- Extract file contents
- Customizable file and directory inclusion patterns
- Customizable file and directory exclusion patterns
- Optional recursive directory traversal
- Optional logging of results
Main Function Parameters
dir_path(str): Path to the local directory.include_project_structure(bool): Include project structure in the output.include_file_contents(bool): Include file contents in the output.include_patterns(List[str], optional): Patterns to include (e.g., [".py", "specific_folder/"]).exclude_patterns(List[str], optional): Patterns to exclude.recursive(bool): Whether to recursively search subdirectories.log_path(str, optional): Path to save the log.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for directory-info-extractor 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 | |
|---|---|---|---|---|
| directory_info_extractor-0.1.1.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| directory_info_extractor-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / directory_info_extractor-0.1.1.tar.gz
| Download URL | directory_info_extractor-0.1.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e4f4fe7134d449841640b969694f95f0c1f3a48b61c2c064cbd408c224671602
|
|
BLAKE2b-256 checksum How to use checksums |
96d56e381dad3dfc852144c212ebeb198a867c11832b99d2912e125e08f737a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.4
|
Release files / directory_info_extractor-0.1.1-py3-none-any.whl
| Download URL | directory_info_extractor-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd67602fe2c94ec2edca311d61af878ba7df69dce061e6c326aea36719b9a151
|
|
BLAKE2b-256 checksum How to use checksums |
82a4988293b2d953252efdef68cec2ec0d4d1ee639fe27baf7865acddd19800e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.4
|
Security for directory-info-extractor 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.