Skip to main content

江西单位社保 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)

Source distribution for jiangxi-social-security 0.3.0
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)

Table of built distributions (wheels) for jiangxi-social-security 0.3.0
File Interpreter ABI Platform Actions
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

Release files / jiangxi_social_security-0.3.0.tar.gz

Download URL jiangxi_social_security-0.3.0.tar.gz
Size 47.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa3535cc51539ce36778dada343b6685eac5525452402fdd924005210518e7cb
BLAKE2b-256 checksum
How to use checksums
ad551ab9b322713232b016acf82c18861aa1b2b4f1dd322ffef8ab8bd7fe8ddf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / jiangxi_social_security-0.3.0-py3-none-any.whl

Download URL jiangxi_social_security-0.3.0-py3-none-any.whl
Size 57.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b19f5b1f196e1413389cde8baa98d06092f96eab46271d32ec6ce8c1fa17599
BLAKE2b-256 checksum
How to use checksums
7c51adbec409ca8b46d8074b1bc73465fe514fc4b0d26abbf31bcad8a87b5701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

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.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page