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.datetime_
- 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.28.1.tar.gz
(156.7 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.28.1.tar.gz.
File metadata
- Download URL: pytilpack-1.28.1.tar.gz
- Upload date:
- Size: 156.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27cf9cad6247bf964dd435940a59e502d93085ebc40a8784b85e625fd5ee7d8c
|
|
| MD5 |
7b25323f49912fa9100fd08e04a25fda
|
|
| BLAKE2b-256 |
939f878205685dd4d42dc107c787607bcb5aad0c8c76d8e61451a49b5803c0ef
|
File details
Details for the file pytilpack-1.28.1-py3-none-any.whl.
File metadata
- Download URL: pytilpack-1.28.1-py3-none-any.whl
- Upload date:
- Size: 66.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bc335d895fe80a8eb89d8c128f598c090ca2208bd60771ed29c8564f0b3f444a
|
|
| MD5 |
888d622480e927afc062ba455c40b7b6
|
|
| BLAKE2b-256 |
444009041146ef472801c958b01702835835c205d3e9721386524cae9600afc7
|