Skip to main content

Pistachio aims to simplify reoccurring tasks when working with the file system.

Project description


Pistachio aims to simplify reoccurring tasks when working with the file system.


To install pistachio, along with the tools you need to develop and run tests, run the following in your virtualenv:

$ python -m venv env
$ source /env/bin/activate
$ pip install flit
$ flit install


You can install pistachio by running the following command.

$ pip install pistachio


To use pistachio you can inport the module by running the following commands.

>>> import pistachio


Method to return a description for the resource.

>>> pistachio.describe("")
Pistachio(path='', exists=True, is_directory=False, is_file=True, is_symlink=False, name='', stem='README', suffix='md')


You can confirm if a directory, file or symbolic link exists using the following method.

>>> pistachio.exists("")

Get MD5 Hash

This method will return the MD5 hash string for a specific file.

>>> pistachio.get_md5_hash("")

Is Directory

Is the resource a directory? True or False.

>>> pistachio.is_directory("")

Is File

Is the resource a file? True or False.

>>> pistachio.is_file("")

Is Symlink

Is the resource a symbolic link? True or False.

>>> pistachio.is_symlink("")

Make a Symlink

Make a new symbolic link.

>>> pistachio.ln("README.txt", "")

Make a Directory

Make a new directory or directory tree.

>>> pistachio.mkdir("src")
>>> pistachio.exists("src")


This method will create an empty file with a given filename and directory path.

>>> pistachio.touch("")


This method will return a list of directories, files and symlinks below a specific directory.

>>> pistachio.tree("src")
Tree(path='pistachio', results=[Pistachio(path='./', exists=True, is_directory=False, is_file=True, is_symlink=False, name='', stem='__init__', suffix='py')])

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

pistachio-0.7.0.tar.gz (6.2 kB view hashes)

Uploaded source

Built Distribution

pistachio-0.7.0-py2.py3-none-any.whl (4.2 kB view hashes)

Uploaded py2 py3

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