zi-api-auth-client-2.0.3
توضیحات
A library that supports username-password and PKI authentication methods for enterprise-api
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | zi-api-auth-client-2.0.3 |
| نام | zi-api-auth-client |
| نسخه کتابخانه | 2.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Krishna Teja Dinavahi |
| ایمیل نویسنده | krishnateja.dinavahi@zoominfo.com |
| آدرس صفحه اصلی | https://github.com/Zoominfo/api-auth-python-client |
| آدرس اینترنتی | https://pypi.org/project/zi-api-auth-client/ |
| مجوز | MIT |
zi_api_auth_client
==============================
This library supports 2 types of authentication methods. Both the methods return a JWT token which you can use to make
api calls for enterprise-api on production.
Username and password authentication:
============================================================
**Usage:**
1. import zi_api_auth_client
2. jwt_token = zi_api_auth_client.user_name_pwd_authentication("your_user_name", "your_password")
PKI authentication:
==============================
This type of authentication needs a private key and a client ID to generate the JWT token.
**Usage:**
1. import zi_api_auth_client
2. Paste your private key:
key = '''
-----BEGIN PRIVATE KEY-----
Your private key goes here
-----END PRIVATE KEY-----'''
3. jwt_token = zi_api_auth_client.pki_authentication("your_user_name", "your_client_id", key)
**Note: If you get the error "ValueError: Could not deserialize key data." when doing PKI authentication, make sure that your private key is properly formatted. Paste the private key as a multi-line string in python.**
**Correct way:**
The following is the right way to paste your private key.
'''
-----BEGIN PRIVATE KEY-----
Your private key goes here
-----END PRIVATE KEY-----'''
**Wrong way:**
Pasting the private key as follows would throw the error "ValueError: Could not deserialize key data." because there are extra spaces on each line in the key.
'''
-----BEGIN PRIVATE KEY-----
Your private key goes here
-----END PRIVATE KEY-----'''
نیازمندی
| مقدار | نام |
|---|---|
| - | PyJWT<3.0.0,>=2.6.0 |
| - | requests<3.0.0,>=2.32.4 |
| - | cryptography>=41.0.6 |
نحوه نصب
نصب پکیج whl zi-api-auth-client-2.0.3:
pip install zi-api-auth-client-2.0.3.whl
نصب پکیج tar.gz zi-api-auth-client-2.0.3:
pip install zi-api-auth-client-2.0.3.tar.gz