Skip to main content

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

provide_dir-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

provide_dir-0.1.2-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

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

Hashes for provide_dir-0.1.2.tar.gz
Algorithm Hash digest
SHA256 74756777bfa2d794bc9df4f3630797e03844a1612f0f00e0d98567e34674e146
MD5 c63deba9b45932ad30bb1bc559548848
BLAKE2b-256 b8c0b7bec1a9bbb6f7a1843359509427c429152a6ea37db5cd4bbcb4e818d414

See more details on using hashes here.

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

Hashes for provide_dir-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 214f7c00d3962aa41fa2e8b36451197823d5ea2a0526c085376fb3687bdc5fa1
MD5 b6a5cf6f4ef5cbd433c363bf1497dcef
BLAKE2b-256 4981d7ebfd2aab814108fa67676bf8277f4c2861b4ff63cd07e46f9e9125069d

See more details on using hashes here.

Supported by

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