python-packaging
إنشاء حزم Python لـ PyPI
也可从以下获取: sickn33,ActiveInferenceInstitute
غالبًا ما يتسبب تجهيز مشروع Python في حدوث أخطاء في الهيكل والبيانات الوصفية. توفر هذه المهارة تخطيطات واضحة وأمثلة تكوين ونشر خطوات لإنشاء حزم قابلة للتوزيع.
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“python-packaging”。 أحتاج إلى pyproject.toml بسيط وتخطيط مجلد لمكتبة.
预期结果:
- استخدم تخطيط src مع مجلد حزمة والاختبارات.
- حدد نظام البناء والبيانات الوصفية للمشروع في pyproject.toml.
- أضف التبعيات وأدوات التطوير الاختيارية.
- أضف README وLICENSE للتعبئة.
正在使用“python-packaging”。 كيف أقوم بإعداد أوامر CLI لحزمني؟
预期结果:
- ثبّت Click كتبع.
- إنشئ وحدة cli.py مع أوامر click.
- حدد نقاط الدخول في قسم pyproject.toml.
- ثبّت في الوضع القابل للتحرير لاختبار الأوامر.
正在使用“python-packaging”。 ما هي خطوات النشر إلى PyPI؟
预期结果:
- ابنِ الحزمة باستخدام python -m build.
- تحقق باستخدام twine check dist/*.
- ارفع إلى TestPyPI أولاً للاختبار.
- ارفع إلى PyPI باستخدام twine upload dist/*.
安全审计
安全Pure documentation skill containing educational content about Python packaging. No executable scripts, network calls, file access, or code execution paths present. All static findings are false positives: the scanner misidentified repository names as cryptographic algorithms, bash documentation examples as shell execution, and legitimate config file references as credential access attempts.
风险因素
🌐 网络访问 (25)
⚙️ 外部命令 (77)
📁 文件系统访问 (2)
质量评分
你能构建什么
تعبئة وحدة قابلة لإعادة الاستخدام
تصميم هيكل نظيف وبيانات وصفية لمكتبة Python مشتركة.
شحن أداة سطر الأوامر
تعريف نقاط دخول وإصدار حزمة CLI إلى PyPI.
أتمتة النشر
إعداد سير عمل للإصدار مع خطوات البناء والرفع.
试试这些提示
Provide a minimal src layout and pyproject.toml for a small Python library named acme-tools.
Show how to add a click based CLI entry point called acme to an existing package.
List the steps to build wheels and publish to TestPyPI and PyPI using twine.
Draft a GitHub Actions workflow that builds and uploads on release creation.
最佳实践
- استخدم تخطيط src لاستيراد آمن
- اختبار التثبيت في بيئة نظيفة
- انشر إلى TestPyPI قبل PyPI
避免
- النشر دون التحقق من البيانات الوصفية
- الاعتماد على إعدادات setup.py الضمنية
- تخطي بناء wheels للإصدار