Python Utility Pack
Project description
pytilpack
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
特定のライブラリに依存しないユーティリティ関数などが入っている。
モジュール一覧
各種ライブラリ用のユーティリティのモジュール一覧
- pytilpack.asyncio_
- pytilpack.base64_
- pytilpack.csv_
- pytilpack.dataclasses_
- pytilpack.fastapi_
- pytilpack.flask_
- pytilpack.flask_login_
- pytilpack.functools_
- pytilpack.json_
- pytilpack.logging_
- pytilpack.openai_
- pytilpack.pathlib_
- pytilpack.python_
- pytilpack.quart_
- pytilpack.sqlalchemy_
- pytilpack.sqlalchemya_ # asyncio版
- pytilpack.threading_
- pytilpack.threadinga_ # asyncio版
- pytilpack.tiktoken_
- pytilpack.tqdm_
- pytilpack.yaml_
その他のユーティリティのモジュール一覧
- pytilpack.cache # ファイルキャッシュ関連
- pytilpack.data_url # データURL関連
- pytilpack.htmlrag # HtmlRAG関連
- pytilpack.sse # Server-Sent Events関連
- pytilpack.web # Web関連
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オプションでコピー元に存在しないコピー先のファイル・ディレクトリを削除
開発手順
- DEVELOPMENT.md を参照
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.24.0.tar.gz
(107.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytilpack-1.24.0.tar.gz.
File metadata
- Download URL: pytilpack-1.24.0.tar.gz
- Upload date:
- Size: 107.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
024278dbc3f04beaba7e8c9c7dfd2f197a81d4052f54b788948c1b6a53b8dd8c
|
|
| MD5 |
5e110ad5b55903e5db4aff9df3cbd582
|
|
| BLAKE2b-256 |
6b2763e295c67cb7dc974e52f156ad27940bcf2558fc19d42b5f34569f8ee646
|
File details
Details for the file pytilpack-1.24.0-py3-none-any.whl.
File metadata
- Download URL: pytilpack-1.24.0-py3-none-any.whl
- Upload date:
- Size: 54.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91c4b276ff7c2e85ed9d499b93749003e2b7086e77e74355d56ba082a7de8f0e
|
|
| MD5 |
5c68d4ecd9fd1037c7fc9820ee3c2cb6
|
|
| BLAKE2b-256 |
53d5db5b377b785b70ce4bc1f8c3afc3bfac09ce44c1b1c243736acee35f3c9d
|