Skip to main content

简介

欢迎使用腾讯会议开发者工具套件(SDK)1.1.0,为方便 Python 开发者调试和接入腾讯云会议 API,这里向您介绍适用于 Python 的腾讯会议开发工具包,并提供首次使用开发工具包的简单示例。让您快速获取腾讯会议 Python SDK 并开始调用。

依赖环境

  1. 依赖环境:Python 3.7 版本及以上。
  2. 购买腾讯会议企业版获取 SecretID、SecretKey,接入的企业 AppId。

获取安装

在第一次使用云API之前,用户首先需要在腾讯云控制台上申请安全凭证,安全凭证包括 SecretID 和 SecretKey,SecretID 是用于标识 API 调用者的身份,SecretKey 是用于加密签名字符串和服务器端验证签名字符串的密钥 SecretKey 必须严格保管,避免泄露。

通过源码包安装

  1. 前往 Github 代码托管地址 下载源码压缩包;
  2. 解压源码包到您项目合适的位置;
  3. 引用方法可参考示例。

示例

以创建会议接口为例:

import random
import time

import wemeet_openapi

# crete_meeting_demo 创建会议请求demo
def crete_meeting_demo():

    # 1.构造 client 客户端(jwt 鉴权需要配置 appId sdkId secretID 和 secretKey)
    client = wemeet_openapi.Client(app_id="2****46", sdk_id="2****50",
                                   secret_id="Zk*****J8h",
                                   secret_key="Y2z*****WRsVksn")

    # 2.构造请求体
    request = wemeet_openapi.ApiV1MeetingsPostRequest(
        body=wemeet_openapi.V1MeetingsPostRequest(
            instanceid=2,
            meeting_type=0,
            subject="测试会议",
            type=1,
            userid="userid",
            start_time="1651334400",
            end_time="1651377600"
        )
    )

    # 3.构造 JWT 鉴权器
    authenticator_builder = wemeet_openapi.JWTAuthenticator(
        nonce=random.randrange(0, 2 ** 64),
        timestamp=str(int(time.time()))
    ).options_build()

    # 4.发送对应的请求
    try:
        response = client.meetings_api.v1_meetings_post(
            request=request,
            authenticator_options=[authenticator_builder])

        print(f"Response from `MeetingsApi.V1MeetingsPost`: {vars(response)}\n")
    except wemeet_openapi.ClientException as e:
        print(f"Error when calling `MeetingsApi.V1MeetingsPost`: {e}\n")

    except wemeet_openapi.ServiceException as svrErr:
        print(f"Error when calling `MeetingsApi.V1MeetingsPost`: {svrErr}\n")
        print(f"Full HTTP response: {str(svrErr.api_resp.raw_body)}\n")


# 调用入口点函数
if __name__ == "__main__":
    crete_meeting_demo()

Metadata

Release files for wemeet-openapi 1.0.0.18

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wemeet-openapi 1.0.0.18
File Size Uploaded
wemeet-openapi-1.0.0.18.tar.gz 44.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wemeet-openapi 1.0.0.18
File Interpreter ABI Platform
wemeet_openapi-1.0.0.18-py3-none-any.whl Python 3 none any Details

Total release size: 143.0 kB

Release files / wemeet-openapi-1.0.0.18.tar.gz

Download URL wemeet-openapi-1.0.0.18.tar.gz
Size 44.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f7c311e944278217e0a62625b6203b27dc53ad1d2e2ce13e89112a400fa2cccf
BLAKE2b-256 checksum
How to use checksums
505724384ee74686c3f7e1bc7753c2974f0c832868e300ee914356a1be818b1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

Release files / wemeet_openapi-1.0.0.18-py3-none-any.whl

Download URL wemeet_openapi-1.0.0.18-py3-none-any.whl
Size 98.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d21916fe9995975849e24f93ef0049c76f40f821caf3de50dd4e474caad4e671
BLAKE2b-256 checksum
How to use checksums
43234348b2cdd53e586323dfe07654d81660d4c6e1d44c2b26bac73826132025
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.0.0.18 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page