Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revelio-0.1.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

revelio-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file revelio-0.1.1.tar.gz.

File metadata

  • Download URL: revelio-0.1.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for revelio-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b57f93a6e16b0d7f54e89204997cacee2225ae7e62c0e8951f369305317ae1ea
MD5 3f4e409dfe41f545992b0c1266e90a55
BLAKE2b-256 ce35af5f7b2be731ac036d928cdb3bce70ea0614ab8c8fd865701d33a4edf056

See more details on using hashes here.

File details

Details for the file revelio-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: revelio-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.19.1 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for revelio-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c75f12d16536fb79e829c5d97a8ae9afa470c897ee8471b74993108bd8ce6e59
MD5 a509db7c60e42b1bc7b4e69f30cedb91
BLAKE2b-256 ae676452c03084488b3146b467ff1a8c6169166df7f40ebb4ba885b9eefe4bf7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page