Skip to content

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

License

Notifications You must be signed in to change notification settings

jalvaradosegura/tmp-folder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages