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
Release history Release notifications | RSS feed
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.11.tar.gz
(4.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file taientsdk-0.0.11.tar.gz.
File metadata
- Download URL: taientsdk-0.0.11.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5481cc48a49ebb483ef4b2a70cff380f4079f22738d532178874565c578387c
|
|
| MD5 |
0996c9f54dd3ff643efbac7b867af563
|
|
| BLAKE2b-256 |
e125f77000fb27f5558867ad9bb5e7eedf7a9f57d221dbc8572dc113ce89776a
|
File details
Details for the file taientsdk-0.0.11-py3-none-any.whl.
File metadata
- Download URL: taientsdk-0.0.11-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73a7311899b4598fc00205b568f51923b2f6053efd7bd497c058f667822b7bb8
|
|
| MD5 |
b31a5e3cd7ed84fd4897cd2f6c2068ba
|
|
| BLAKE2b-256 |
0d859e0b6696caaf219c6c069a8cd306acdb0ae3e11b10a3f6acce73290fd656
|