Skip to main content

Extends python `TemporaryDirectory` and make it even easier to use, as a decorator.

Project description

tmp-folder

black isort License downloads image-by


Documentation: https://jalvaradosegura.github.io/tmp-folder/


tmp-folder

Easily create a temporary folder. Put files in it and after you're done tmp-folder will delete the folder automatically.

Installation

Install from PyPI:

pip install tmp-folder

Usage

This is the minimum you need to get started with tmp-folder:

from pathlib import Path

from tmp_folder import use_tmp_folder


@use_tmp_folder
def foo(tmp_folder: Path):
    pass

Just decorate the function in which you need a temporary folder. Then add as first parameter, the variable that will hold the temporary folder path (it can be named however you want). Finally, after the function execution is completed, the folder will be deleted.

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

tmp_folder-0.2.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

tmp_folder-0.2.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file tmp_folder-0.2.0.tar.gz.

File metadata

  • Download URL: tmp_folder-0.2.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.2 Darwin/20.6.0

File hashes

Hashes for tmp_folder-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9864955a30cd250c5c81822ae9c5b215c23fba847cfd5b804d9eae5afa1187fb
MD5 08676267f61eaa7d158d1145d858b81b
BLAKE2b-256 4509c9610e97af89478f3176b6657efb8608f66c6bfb96fe101e12e0f03af8cc

See more details on using hashes here.

File details

Details for the file tmp_folder-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tmp_folder-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.2 Darwin/20.6.0

File hashes

Hashes for tmp_folder-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc73073b31839ea5d1b488fd46bbfa3761a3ff9dd56331ad39d7a5c2de77660
MD5 b5d39bf9eadeed7a284b0d53b5800f0b
BLAKE2b-256 1b7cdd8714b8e2e47b9ac55735c0814d621e9f1a133b80d402aeecc91db41991

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