Skip to main content

Универсальный инструмент для работы с директориями и файлами

Project description

directory_manager

directory_manager — удобная библиотека для управления файлами и директориями в Python.

Она предоставляет готовые инструменты для:

  • создания и удаления директорий и файлов
  • копирования с фильтрацией по расширениям
  • очистки директорий без удаления самих папок
  • архивирования и разархивирования .zip
  • логирования всех операций

Установка

pip install dir_manager

Пример

from directory_manager import DirectoryManager
from pathlib import Path

dm = DirectoryManager("workspace")

# Создание папки и файла
dm.create_dir(Path("workspace/new_folder"))
dm.create_file(Path("workspace/new_folder/example.txt"), "Привет, мир!")

# Копирование всех .txt файлов без вложенности
dm.copy_flat(Path("workspace"), Path("backup"), extensions=[".txt"])

# Архивация
dm.zip_dir(Path("workspace"), Path("workspace.zip"))

# Очистка папки
dm.clear_dir(Path("workspace"))

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

directory_manager_ap-0.1.1.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

directory_manager_ap-0.1.1-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file directory_manager_ap-0.1.1.tar.gz.

File metadata

  • Download URL: directory_manager_ap-0.1.1.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for directory_manager_ap-0.1.1.tar.gz
Algorithm Hash digest
SHA256 516d2954af53794957287122be6d290740224330c076e276f314fae7136705ec
MD5 72cf5be456b2b0f23dd83bd926094fdd
BLAKE2b-256 4cb55b131f456262204411e9bd6f6e3c105f87ee48d1d6c38aa2a8e1cdced453

See more details on using hashes here.

File details

Details for the file directory_manager_ap-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for directory_manager_ap-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 52438880a26fcecaab94e35d876acca95c9e38d321fd5b46286268ce4c3d4db9
MD5 cef061dc0932f2a27751de590829bf20
BLAKE2b-256 dc13662b7aff382068df5125e02bfa7a4f1d89ef31258cf0406de528edf221c3

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