This project has been archived by its maintainers, and is no longer receiving any updates.
OVINC Union Api SDK
A Python client for OVINC Union API, providing easy access to authentication, notifications, and TCaptcha verification.
Installation
pip install ovinc-client
Usage
Initialization
from ovinc_client.client import OVINCClient
APP_CODE = "your_app_code"
APP_SECRET = "your_app_secret"
OVINC_API_URL = "https://api.ovinc.cn"
client = OVINCClient(app_code=APP_CODE, app_secret=APP_SECRET, union_api_url=OVINC_API_URL)
Notifications (Notice)
Send Email
response = client.notice.mail({
"to": "user@example.com",
"subject": "Hello",
"content": "This is a test email."
})
print(response.data)
Send SMS
response = client.notice.sms({
"phone": "13800138000",
"template_id": "123456",
"params": ["1234"]
})
print(response.data)
Send Robot Message
response = client.notice.robot({
"channel": "wecom",
"content": "Hello from robot"
})
print(response.data)
Authentication (Auth)
Verify Code
response = client.auth.verify_code({
"code": "123456",
"key": "user_identifier"
})
print(response.data)
TCaptcha Verification
This module requires Django settings configuration.
Settings:
# settings.py
CAPTCHA_TCLOUD_ID = "your_tencent_cloud_id"
CAPTCHA_TCLOUD_KEY = "your_tencent_cloud_key"
CAPTCHA_APP_ID = "your_captcha_app_id"
CAPTCHA_APP_SECRET = "your_captcha_app_secret"
CAPTCHA_ENABLED = True
Usage:
from ovinc_client.tcaptcha.utils import TCaptchaVerify
# In your view or API
def verify_captcha(request):
user_ip = request.META.get("REMOTE_ADDR")
ticket = request.data.get("ticket")
randstr = request.data.get("randstr")
ret = request.data.get("ret")
verifier = TCaptchaVerify(
user_ip=user_ip,
ticket=ticket,
randstr=randstr,
ret=ret
)
if verifier.verify():
return "Success"
else:
return "Failed"
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for ovinc-client 0.4.16
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ovinc_client-0.4.16.tar.gz | 28.6 kB | Without provenance | Details for ovinc_client-0.4.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovinc_client-0.4.16-py3-none-any.whl | Python 3 | none | any | Details for ovinc_client-0.4.16-py3-none-any.whl |
Total release size: 69.2 kB
Release files / ovinc_client-0.4.16.tar.gz
| Download URL | ovinc_client-0.4.16.tar.gz |
|---|---|
| Size | 28.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b6d28ebf9e2c86b28b328993e0dcb3e4adf5f2d3a96d73995e9863640b8fa649
|
|
BLAKE2b-256 checksum How to use checksums |
1c076f2ee6e8f13dcb27e7cd2db11d9b89004952fb15e20608ce02aa82c30b23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Release files / ovinc_client-0.4.16-py3-none-any.whl
| Download URL | ovinc_client-0.4.16-py3-none-any.whl |
|---|---|
| Size | 40.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b20181d611128c2a09532ca93e1eaa88a3e3cd987ce910519d4d79ab62375c2c
|
|
BLAKE2b-256 checksum How to use checksums |
7fe8a62e8d2af0f44a3e782a027e8edbcbbcbc3cf8a1dd9f0705aea9bea52109
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.25
|
Security for ovinc-client 0.4.16
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.