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.threading_
- 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.23.1.tar.gz
(105.9 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.23.1.tar.gz.
File metadata
- Download URL: pytilpack-1.23.1.tar.gz
- Upload date:
- Size: 105.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98775ec9f7ac190c40fb0d597ae4f023f49a9033d4deeb8a9f181bb18ee0d373
|
|
| MD5 |
15dae2904fa6207d492036b71f78cc0b
|
|
| BLAKE2b-256 |
31fe2c6e51bc59bbc2cf99b2b1bbd8c8afeb2975a27038c00dd32c042766111d
|
File details
Details for the file pytilpack-1.23.1-py3-none-any.whl.
File metadata
- Download URL: pytilpack-1.23.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63dbbdfc59363e7a2b879bbc92e3d46b4c8095ebb64b2b1a9c33247e9c083c90
|
|
| MD5 |
87e30a846ed22585d889baff58d48307
|
|
| BLAKE2b-256 |
81d19c681fa296979ea5845488823bf12f88129016721d444ba29e9779e12a6d
|