Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

A miniscule python package for joining and resolving paths against multiple possible directories.A python package for resolving relative paths against multiple root directories

Project description

A miniscule python package for joining and resolving paths against multiple possible directories.

[documentation]

Installation

To install use pip:

$ pip install multipath

Or clone the repo:

$ git clone https://github.com/adamkewley/multipath.git $ python setup.py install

Example Usage

import multipath

paths = [
    "./",
    "~/.someapp/",
    "etc/someapp/",
]

# returns:
#   './config.yml` if it exists; or,
#   '~/.someapp/config.yml` if it exists; or,
#   'etc/someapp/config.yml` if it exists; or,
#   raises FileNotFoundError
config = multipath.resolve(paths, "config.yml")

Project details


Release history Release notifications

This version
History Node

0.0.2

History Node

0.0.1

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
multipath-0.0.2.tar.gz (3.1 kB) Copy SHA256 hash SHA256 Source None Apr 12, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page