Provides a directory with all its parent directories, if it does not yet exist
Project description
provide_directory
Function to create the given path, including potential parent directories. Writes to the provided sink (e.g. print) whether the directory was created or whether it already existed.
Dependencies
None
Usage
from pathlib import Path
from provide_dir import provide_dir
needed_path = Path("/path/to/directory/with/subdirectories")
provide_dir(needed_path, print)
Installation
Pip
pip install provide_dir
Developer's Installation
You can clone the repository and install it with pip install -e /path/to/local/repository.
Test dependencies
To run the tests you will need
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
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 provide_dir-0.1.2.tar.gz.
File metadata
- Download URL: provide_dir-0.1.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
74756777bfa2d794bc9df4f3630797e03844a1612f0f00e0d98567e34674e146
|
|
| MD5 |
c63deba9b45932ad30bb1bc559548848
|
|
| BLAKE2b-256 |
b8c0b7bec1a9bbb6f7a1843359509427c429152a6ea37db5cd4bbcb4e818d414
|
File details
Details for the file provide_dir-0.1.2-py3-none-any.whl.
File metadata
- Download URL: provide_dir-0.1.2-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
214f7c00d3962aa41fa2e8b36451197823d5ea2a0526c085376fb3687bdc5fa1
|
|
| MD5 |
b6a5cf6f4ef5cbd433c363bf1497dcef
|
|
| BLAKE2b-256 |
4981d7ebfd2aab814108fa67676bf8277f4c2861b4ff63cd07e46f9e9125069d
|