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

Uploaded Python 3

File details

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

File metadata

  • Download URL: taientsdk-0.0.7.tar.gz
  • Upload date:
  • Size: 6.0 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.7.tar.gz
Algorithm Hash digest
SHA256 2c7a263c5ac80310cd7f830c6ce7e189a457389758d97344ae37ab249d75d002
MD5 ff5106416ca187fee226620ba808c0da
BLAKE2b-256 6c16a14906df69d2d76d9e8ca9ba5991034260be94ac28d89222d723022cce60

See more details on using hashes here.

File details

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

File metadata

  • Download URL: taientsdk-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 4.5 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 3e373c7cde61a9d4f97a0fcfe4bd7dc677e33c781f3a25f8f34a67964f14f988
MD5 bd9453360ef13cea064db88dac51f0b0
BLAKE2b-256 d43ddcfc4e9ec05c0ef9c5f80a0569558fb5a9fb701d9c08d42d56475b0a966d

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