Skip to main content

taient sdk for python

Project description

Taient SDK for Python

pip install taientsdk requests dotenv
cat > .env<<EOF
TAIENT_HRP_SERVER=...
TAIENT_HRP_PORT=...
EOF
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taientsdk-0.0.8.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taientsdk-0.0.8-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file taientsdk-0.0.8.tar.gz.

File metadata

  • Download URL: taientsdk-0.0.8.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for taientsdk-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e5ebc76012732591ad2b3ea25c759cf930ae24fda7cd0f95d72e277e0a3e3ecc
MD5 8fd6622f7aab6b1080bd63d031eaf16a
BLAKE2b-256 3e126f70af2e18309a37d6017b0fe8430f2ab999141252e271ed4b23b7517bda

See more details on using hashes here.

File details

Details for the file taientsdk-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: taientsdk-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for taientsdk-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 3a7273e431e2b01c2128c72717ba4234bf5f5da8d7634bc54f44827eb027b8ac
MD5 ef9deb12de2bb1f5950a6ee2d277561c
BLAKE2b-256 9f8c432856422a186dea67c149459f63ff8a98c3c3dbe8c9e61c1bb13843441e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page