Skip to main content

Python Utility Pack

Project description

pytilpack

Code style: black Lint&Test PyPI version

Pythonの各種ライブラリのユーティリティ集。

インストール

pip install pytilpack
# pip install pytilpack[all]
# pip install pytilpack[fastapi]
# pip install pytilpack[flask]
# pip install pytilpack[htmlrag]
# pip install pytilpack[markdown]
# pip install pytilpack[openai]
# pip install pytilpack[pyyaml]
# pip install pytilpack[quart]
# pip install pytilpack[sqlalchemy]
# pip install pytilpack[tiktoken]
# pip install pytilpack[tqdm]

使い方

各種ライブラリ用のユーティリティ

import pytilpack.xxx_

xxxのところは各種モジュール名。openaiとかpathlibとか。 それぞれのモジュールに関連するユーティリティ関数などが入っている。

その他のユーティリティ

import pytilpack.xxx

特定のライブラリに依存しないユーティリティ関数などが入っている。

モジュール一覧

各種ライブラリ用のユーティリティのモジュール一覧

その他のユーティリティのモジュール一覧

CLIコマンド

一部の機能はCLIコマンドとしても利用可能。

空のディレクトリを削除

python -m pytilpack.cli.delete_empty_dirs path/to/dir [--no-keep-root] [--verbose]
  • 空のディレクトリを削除
  • デフォルトでルートディレクトリを保持(--no-keep-rootで削除可能)

古いファイルを削除

python -m pytilpack.cli.delete_old_files path/to/dir --days=7 [--no-delete-empty-dirs] [--no-keep-root-empty-dir] [--verbose]
  • 指定した日数より古いファイルを削除(--daysオプションで指定)
  • デフォルトで空ディレクトリを削除(--no-delete-empty-dirsで無効化)
  • デフォルトでルートディレクトリを保持(--no-keep-root-empty-dirで削除可能)

ディレクトリを同期

python -m pytilpack.cli.sync src dst [--delete] [--verbose]
  • コピー元(src)からコピー先(dst)へファイル・ディレクトリを同期
  • 日付が異なるファイルをコピー
  • --deleteオプションでコピー元に存在しないコピー先のファイル・ディレクトリを削除

開発手順

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytilpack-1.23.0.tar.gz (105.8 kB view details)

Uploaded Source

Built Distribution

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

pytilpack-1.23.0-py3-none-any.whl (53.0 kB view details)

Uploaded Python 3

File details

Details for the file pytilpack-1.23.0.tar.gz.

File metadata

  • Download URL: pytilpack-1.23.0.tar.gz
  • Upload date:
  • Size: 105.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for pytilpack-1.23.0.tar.gz
Algorithm Hash digest
SHA256 af1be4b40aef8bc79d90ad7b1bd6638cf05b6b0ed157807cf2b6db93ed3de426
MD5 709e247194abc42928ea8a27befb6958
BLAKE2b-256 39cc074f95de50a960302ea12dfc17b88f4cc5dab40f346dc8d085b67c978152

See more details on using hashes here.

File details

Details for the file pytilpack-1.23.0-py3-none-any.whl.

File metadata

  • Download URL: pytilpack-1.23.0-py3-none-any.whl
  • Upload date:
  • Size: 53.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.8

File hashes

Hashes for pytilpack-1.23.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4e430dc5c85b213b12c206b188d8171a2bd73582bc9415d1ddb2b90c9d777145
MD5 aee13f58accec24f7c1bdd772c2cb533
BLAKE2b-256 3e0ad95827ab000b094f850196b1459dca3e2d51f9661d4a05c9b6eb3d429e66

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