江西单位社保 Python SDK
适用于江西人社单位社保服务大厅。支持手工增员和减员、人员校验、材料上传、预警补填和办件进度查询。
安装
要求 Python 3.10 或以上。使用已有登录会话或手工提供验证码时,安装基本包。
python -m pip install jiangxi-social-security
法人账号登录可选用本地模型自动识别图形验证码。使用该功能时安装额外依赖。
python -m pip install "jiangxi-social-security[jiangxi-ocr]"
接入单位会话
from jiangxi_social_security import JiangxiClient
def get_options(unit_session):
client = JiangxiClient(session=unit_session)
return client.get_add_options()
unit_session 是已登录并选定办理单位的 requests.Session。也可以使用 login_session(1, PasswordCredentials(username, password), employer_name=employer_name) 发起法人账号登录并按名称选择单位。未安装验证码识别依赖时,可传入 captcha_provider 读取经办人填写的验证码。
业务入口
begin_enrollment()打开增员办件。使用EnrollmentForm提供信息,通过validate_employee()校验人员,选择险种并上传对应材料后调用submit()。begin_removal()打开减员办件。使用find_employees()查找本单位人员,通过add_employee()加入确认名单,上传材料后调用submit()。- 保存办件的
project_id,使用get_case_progress(project_id)核对审核状态。结果未知时先核对办件进度,再决定是否重新提交。
SDKError 提供 kind、step 和 code。正式办理前请核对登录单位、人员和材料。增减员提交、材料和审核分支通过模拟响应验证。
Metadata
Release files for jiangxi-social-security 0.3.0
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 |
|---|---|---|---|---|
| jiangxi_social_security-0.3.0.tar.gz | 47.0 kB | Without provenance | Details for jiangxi_social_security-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jiangxi_social_security-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for jiangxi_social_security-0.3.0-py3-none-any.whl |
Total release size: 104.5 kB
Security for jiangxi-social-security 0.3.0
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.