Introduction¶
DeepSeek Harness (DSH) does not natively include the ability to publish Python packages. Local developers working in a DSH environment who need to interact with PyPI can typically only invoke external CLI tools (such as twine), which requires a local Python installation and storing sensitive API tokens in configuration files. For DSH sessions that rely purely on a browser environment or lack a local Python installation, this approach is impractical.
The dsh-pypi-flow plugin provides DSH with a full PyPI workflow: querying project and release history, checking name availability, uploading distribution files, managing account credentials, and maintaining a list of tracked projects in the settings panel. It does not depend on local Python, twine, or pip — all operations are performed through PyPI’s public JSON API and the official upload endpoint.
Plugin Positioning¶
This plugin is maintained by user zhang1024899756 and is categorized as a “Network Tool.” It does not simulate PyPI website interactions; instead, it builds tools based on API capabilities: querying project info, listing versions, verifying name occupancy, probing token validity, and executing real uploads.
Core Features¶
1. Project Query & Version Management¶
pypi_info: Retrieve the project’s latest version, summary, supported Python versions, owning account, release count, last upload timestamp, and yank status.pypi_versions: List all published versions in reverse chronological order, with file count and yank status for each.pypi_check_name: Check whether a PyPI name is available and report its current occupancy status (note: availability does not guarantee registrability, as PyPI reserves names).
2. Credential Management & Probing¶
pypi_config: Bind a PyPI username, save or clear a token (supporting persistence or session-only), set the default target repository (PyPI or TestPyPI), and add or remove tracked projects.pypi_status: Display binding status, masked token, tracked project count, and last publish timestamp.pypi_probe_token: Send a no-file request to the upload endpoint to probe whether a token is usable. This endpoint cannot validate a token offline; results are inferred from behavior, and a real upload remains the authoritative check.
3. Distribution File Upload¶
pypi_publish: Upload.whlor.tar.gzfiles to PyPI or TestPyPI. Supports dry-run pre-checks, specifying a build output path, or automatically runningpython -m build.pypi_delete_guide: Returns the actual rules for deleting or yanking a release and provides a direct link to the PyPI management page.
4. Settings Panel¶
In the DSH Settings → PyPI panel, there are four sections:
- Account binding: Enter your PyPI username and API token. The token is written only to the local credential store ($DSH_HOME/.credentials.yaml); the panel displays a masked version (e.g., pypi-A****c9a1).
- My projects: Display the list of tracked projects, including latest version, last upload time, file count, and whether ownership includes the currently bound user.
- Package lookup: Enter a project name to retrieve its current status directly.
- Notes: Explain where the token is stored, why project-scoped tokens are recommended, and why tokens cannot be pre-validated.
Installation & Activation¶
Install from npm (recommended):
dsh plugin add dsh-pypi-flow
You can also install by entering the same name in the “Add Plugin” field in DSH’s plugin manager. The current version is 0.1.1.
Add the plugin marketplace index source:
https://raw.githubusercontent.com/zhang1024899756/dsh-pypi-flow/main/market/index.json
Add this URL as an index source in DSH’s Discover page, and you’ll see “PyPI workflow” in the list with a one-click install option.
Install from GitHub:
/plugin add github:zhang1024899756/dsh-pypi-flow
Or run in the terminal:
dsh plugin --profile web add github:zhang1024899756/dsh-pypi-flow
Typical Usage¶
Check Name Availability¶
pypi_check_name { name: "my-new-pkg" }
Query Project Info¶
pypi_info { name: "requests" }
View Version History¶
pypi_versions { name: "requests" }
Pre-check Publish (No Actual Upload)¶
pypi_publish { path: "D:/proj/dist", dryRun: true }
Real Upload¶
pypi_publish { path: "D:/proj/dist" }
Upload to a Specific Repository¶
pypi_publish { path: "D:/proj/dist", repository: "testpypi" }
Auto-Build Then Upload¶
pypi_publish { path: "D:/proj", build: true }
build: true executes python -m build --outdir dist in the project directory, which requires a local Python installation and the build module (pip install build). Pointing directly to an existing dist/ directory does not require a build step.
Credential Security¶
- Tokens are stored in the DSH credential service, not in configuration files or plugin state files.
$DSH_HOME/pypi-flow.jsononly stores the username, tracked list, and last upload receipt; permissions are set to 0600 and no secrets are included.- All tool outputs, routing responses, and log lines are inspected to ensure no plaintext tokens appear.
- You can choose not to persist the token: the
sessionTokenoption inpypi_configis kept in memory only and discarded when the process ends.
Applicable Scenarios & Caveats¶
- Suitable for scenarios requiring PyPI queries and publishing within DSH, such as automated release scripts, dependency version checks, and project management tool integration.
- The plugin runs with the privileges of the current DSH process; review the source code and license before installation.
- PyPI does not provide a delete API; the plugin only offers operational guidance and direct links, and will not attempt to execute deletion or yanking.
Conclusion¶
dsh-pypi-flow provides DeepSeek Harness with a zero-dependency PyPI workflow covering querying, validation, uploading, and credential management. It does not promise features that cannot be implemented; instead, it builds on the factual capabilities of the PyPI API and encapsulates common operations as directly callable tools.
- Directory page: https://www.skillhub.cn/plugins/zhang1024899756/dsh-pypi-flow
- GitHub: https://github.com/zhang1024899756/dsh-pypi-flow