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.10.tar.gz (4.9 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.10-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: taientsdk-0.0.10.tar.gz
  • Upload date:
  • Size: 4.9 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.10.tar.gz
Algorithm Hash digest
SHA256 77aa99f6028c0b6a9c4bdf139f756530a8a446280057a573e3eb2025dd994f57
MD5 9e969ac8a01d6905300649f6e5b7c5aa
BLAKE2b-256 66d46713fb1375bef58562a35e815e1b2306d0a018bf98ad52166c7fdd46c226

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taientsdk-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 5.3 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 b7b436c46dd302813fa0af43ac43cf7b04527b35c2ed0640cda0a077d15376e6
MD5 ab614ac4092e49b86996e40feab385bc
BLAKE2b-256 954edf5bc917df5b75a2679f0fccb3fb5e4eb576a47f70d5865657b5d93fb48d

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