Skip to main content

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

Project description

directory_manager

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

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

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

Установка

pip install directory_manager_AP

Пример

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.4.tar.gz (11.5 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.4-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for directory_manager_ap-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b8d09e8d8ee1cd1019d8c4ee84b5da281f77cdf96e73a273ca33db9790004292
MD5 c0082a5829c943e74fd04f4782a1e176
BLAKE2b-256 87cec264757cd15722b1eda486bee1e42eefbf1eefc59678b6462f2edf53f90d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for directory_manager_ap-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 191767689eeadf44cf6201a7068d7694869b319847c59d46422e042da03085f4
MD5 59b9d4359aa128f3e08caea331c0fa47
BLAKE2b-256 a2676cc28e8c3f2883e6a65ce177d4adca75f14878ff6a0b47aa199221f80678

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