Python library for interacting with the file system
Project description
Revelio
Revelio is a Python library for interacting with the file system in an object oriented manner. I know you can use os and os.path to do all of these but I find their usage hard to remember and not very object oriented.
Installation
You can use pip to install Revelio.
pip install revelio
Usage
Revelio is an object oriented interface for the file system. All files and directories (folders) are considered Path objects. Any path except the root, has a parent: the directory it is in. Directories have children, some of them are files and some are subdirectories.
Path
Usually we want to start in the current working directory:
from revelio import Path
current_directory = Path.get_current_directory()
# ls or dir:
print(current_directory.list())
# get the first subdirectory:
first_subdirectory = current_directory.directories[0]
# get the parent directory:
parent_directory = current_directory.parent_directory
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file disk-0.1.1.tar.gz.
File metadata
- Download URL: disk-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b37a0b74994525fa64918f0a1199899811a789e5903ba1b0bc9e6181a7b73b4
|
|
| MD5 |
5f4c4cb38324d8dd3e29e8bfb5eab069
|
|
| BLAKE2b-256 |
776b5a3222b8c8661c09fcf2f0f8028aea1e3449c8c23489e464c4585764ca89
|
File details
Details for the file disk-0.1.1-py3-none-any.whl.
File metadata
- Download URL: disk-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af2137e9a1b302ad8867ee9bc3eec9debae2331a55afaf40343ae51fa69f2244
|
|
| MD5 |
11241e246adec0dee289714c81089a4f
|
|
| BLAKE2b-256 |
4ccee41a1492fade7920aaac4d7d4e3e8c622e2b861b4ecb8a66d92795f0a1e9
|