versifier
Overview
这个项目提供了一套命令行工具集,主要用于处理 Python 项目的依赖管理。主要功能包括:
- 将 requirements.txt 转化为 Poetry 的 pyproject.toml
- 将 Poetry 的 pyproject.toml 导出为 requirements.txt
- 将私有包提取到指定目录
Installation
使用 pip 来安装这个项目:
pip install versifier
Commands
requirements-to-poetry
将 requirements 转换为 poetry。
versifier requirements-to-poetry --requirements <requirements_files> --dev-requirements <dev_requirements_files> --exclude <exclude_packages> --add-only --config <config_file> --root <root_dir> --poetry-path <path_to_poetry> --nuitka-path <path_to_nuitka3> --log-level <log_level>
参数说明:
-R, --requirements: 指定 requirements 文件。默认为当前目录的 requirements.txt。-d, --dev-requirements: 指定开发环境的 requirements 文件。默认为当前目录的 dev-requirements.txt。-e, --exclude: 指定要排除的包。--add-only: 只添加指定的包,而不删除任何现有的包。-c, --config: 指定配置文件。-r, --root: 指定根目录。默认为当前目录。--poetry-path: 指定 poetry 的路径。默认为 "poetry"。--nuitka-path: 指定 nuitka3 的路径。默认为 "nuitka3"。--log-level: 指定日志级别。
poetry-to-requirements
将 poetry 转换为 requirements。
versifier poetry-to-requirements --output <output_file> --exclude-specifiers --include-comments --include-dev-requirements --extra-requirements <extra_requirements> --markers <markers> --private-packages <private_packages> --config <config_file> --root <root_dir> --poetry-path <path_to_poetry> --nuitka-path <path_to_nuitka3> --log-level <log_level>
参数说明:
-o, --output: 指定输出文件。--exclude-specifiers: 排除指定的包。--include-comments: 包含注释。-d, --include-dev-requirements: 包含开发环境的 requirements。-E, --extra-requirements: 指定额外的 requirements。-m, --markers: 指定标记。-P, --private-packages: 指定私有包。-c, --config: 指定配置文件。-r, --root: 指定根目录。默认为当前目录。--poetry-path: 指定 poetry 的路径。默认为 "poetry"。--nuitka-path: 指定 nuitka3 的路径。默认为 "nuitka3"。--log-level: 指定日志级别。
extract-private-packages
提取私有包。
versifier extract-private-packages --output <output_dir> --extra-requirements <extra_requirements> --exclude-file-patterns <exclude_files> --private-packages <private_packages> --config <config_file> --root <root_dir> --poetry-path <path_to_poetry> --nuitka-path <path_to_nuitka3> --log-level <log_level>
参数说明:
-o, --output: 指定输出目录。默认为当前目录。-E, --extra-requirements: 指定额外的 requirements。--exclude-file-patterns: 指定要排除的文件模式。-P, --private-packages: 指定要提取的私有包列表。-c, --config: 指定配置文件。-r, --root: 指定根目录。默认为当前目录。--poetry-path: 指定 poetry 的路径。默认为 "poetry"。--nuitka-path: 指定 nuitka3 的路径。默认为 "nuitka3"。--log-level: 指定日志级别。
obfuscate-project-dirs
混淆项目目录。
versifier obfuscate-project-dirs --output <output_dir> --sub-dirs <included_sub_dirs> --exclude-packages <exclude_packages> --config <config_file> --root <root_dir> --poetry-path <path_to_poetry> --nuitka-path <path_to_nuitka3> --log-level <log_level>
参数说明:
-o, --output: 指定输出目录。默认为当前目录。-d, --sub-dirs: 指定要包含的子目录。--exclude-packages: 指定要排除的包。-c, --config: 指定配置文件。-r, --root: 指定根目录。默认为当前目录。--poetry-path: 指定 poetry 的路径。默认为 "poetry"。--nuitka-path: 指定 nuitka3 的路径。默认为 "nuitka3"。--log-level: 指定日志级别。
obfuscate-private-packages
混淆私有包。
versifier obfuscate-private-packages --output <output_dir> --extra-requirements <extra_requirements> --private-packages <private_packages> --config <config_file> --root <root_dir> --poetry-path <path_to_poetry> --nuitka-path <path_to_nuitka3> --log-level <log_level>
参数说明:
-o, --output: 指定输出目录。默认为当前目录。-E, --extra-requirements: 指定额外的 requirements。-P, --private-packages: 指定要混淆的私有包列表。-c, --config: 指定配置文件。-r, --root: 指定根目录。默认为当前目录。--poetry-path: 指定 poetry 的路径。默认为 "poetry"。--nuitka-path: 指定 nuitka3 的路径。默认为 "nuitka3"。--log-level: 指定日志级别。
License
此项目使用 MIT 许可证。有关详细信息,请参阅 LICENSE 文件。
Contributing
我们欢迎各种形式的贡献,包括报告问题、提出新功能、改进文档或提交代码更改。如果你想要贡献,请查看 CONTRIBUTING.md 获取更多信息。
Metadata
Release files for versifier 0.3.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| versifier-0.3.3.tar.gz | 12.6 kB | Without provenance | Details for versifier-0.3.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| versifier-0.3.3-py3-none-any.whl | Python 3 | none | any | Details for versifier-0.3.3-py3-none-any.whl |
Total release size: 25.3 kB
Release files / versifier-0.3.3.tar.gz
| Download URL | versifier-0.3.3.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b19040c084938ec3d7dd4d33fbc73a13daafeb43f81ca4c80ae60ca8bb4e525d
|
|
BLAKE2b-256 checksum How to use checksums |
f6fcebf4abe332d4e614c7f157a6c7f4c3d4b6372dd594b2faf5a77782b1b3ff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.15 CPython/3.6.10 Darwin/24.0.0
|
Release files / versifier-0.3.3-py3-none-any.whl
| Download URL | versifier-0.3.3-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0990ec787245452028c2b209491dbdfec9c99f18cebf8b31598a877670f40f3e
|
|
BLAKE2b-256 checksum How to use checksums |
539679703f747240a9bb037da60d72956c0c8398260e6d0b26c65fd94b6ad633
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.15 CPython/3.6.10 Darwin/24.0.0
|
Security for versifier 0.3.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.