Metadata-Version: 2.4
Name: taientsdk
Version: 0.0.11
Summary: taient sdk for python
Project-URL: Homepage, https://gitee.com/radiumweilei/taientsdk
Project-URL: Issues, https://gitee.com/radiumweilei/taientsdk/issues
Author-email: radium <weilei@taient.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: dotenv>=0.9.9
Requires-Dist: requests>=2.25.0
Description-Content-Type: text/markdown

# Taient SDK for Python

```shell
pip install taientsdk requests dotenv
```

```shell
cat > .env<<EOF
TAIENT_HRP_SERVER=...
TAIENT_HRP_PORT=...
EOF
```

```shell
cat > demo.py<<EOF
from dotenv import load_dotenv
from taientsdk import TaientClient

load_dotenv()

if __name__ == "__main__":
    # 1. init client
    conf = {
        "TAIENT_HRP_USERNAME": "your_username",
        "TAIENT_HRP_PASSWORD": "your_password"
    }
    client = TaientClient(config=conf)

    # 2. Obtain a list of candidates with contact information
    # POST /exploree/search
    search_payload = {
        "page": 1,
        "rowsPerPage": 10,
        "searchParamList": [
            {
                "name": "有电话",
                "typeValue": "contactTypes"
            }
        ]
    }
    hrp_response = client.hrp_post("/exploree/search", search_payload)
    if hrp_response:
        print("List of candidates with phone numbers:", client.get_data(hrp_response, dict))

    # 3. Obtain contact information of a specific candidate
    # GET /candidate/getCandidateContact?candidateId={exploreeId}
    hrp_response = client.hrp_get("/candidate/getCandidateContact?candidateId=ea7d4851-48e9-4f40-9177-df9b41be2a36")
    if hrp_response:
        print("Candidate contact information:", client.get_data(hrp_response, dict))

    # 4. Write a follow-up and determine whether it has been duplicated (within iSoftStone)
    # GET /candidate/comment/{exploreeId}
    comment = {
        "commentText": "api测试跟进"
    }
    hrp_response = client.hrp_post("/candidate/comment/ea7d4851-48e9-4f40-9177-df9b41be2a36", comment)
    if hrp_response:
        print("Write follow-up information for candidate:", client.get_data(hrp_response, dict))

    # 5. Obtain candidate details (optional)
    # GET /candidate/getCandidateBasicInfo?candidateId={exploreeId}
    hrp_response = client.hrp_get("/candidate/getCandidateBasicInfo?candidateId=2e0441d8-6bae-4424-a9f8-86c5726ba77d")
    if hrp_response:
        print("Detailed information of candidate:", client.get_data(hrp_response, dict))

EOF
```