Skip to main content

A Python SDK for Agora Server

Project description

Notice

  • this is a python sdk wrappered agora rtc sdk.
  • can dev under mac, and release unde linux
  • the examples is just a simple demo, it is not a good practice to use it in production

Very import notice !!!!!!!

  • It's crucial that a process can only have one instance.
  • One instance can have multiple connections.
  • In all observers or callbacks, it is not allowed to call the SDK's own APIs, nor is it permitted to perform CPU-intensive tasks within the callbacks. However, data copying is allowed.

Required OS and python version

  • supported Linux version:

    • Ubuntu 18.04 LTS and above
    • CentOS 7.0 and above
  • supported Mac version:

    • MacOS 13 and above
  • python version:

    • python 3.8 above

Test Data

  • download and unzip test_data.zip
  • make test_data directory in the same directory with agora_rtc

Linux debug & develop

Prepare C version of agora rtc sdk

  • make agora_sdk directory under the directory of agora_rtc/agora/rtc
  • download and unzip agora_sdk.zip to agora_sdk
  • there should be libagora_rtc_sdk.so and include_c in agora_sdk directory

run example on linux

python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx --userId=xxx --audioFile=./test_data/demo.pcm --sampleRate=16000 --numOfChannels=1

Mac debug & develop

Prepare C version of agora rtc sdk

  • make agora_sdk directory under the directory of agora_rtc/agora/rtc
  • download and unzip agora_sdk.zip to agora_sdk
  • there should be libAgoraRtcKit.dylib in agora_sdk directory

run example on mac

python agora_rtc/examples/example_audio_pcm_send.py --appId=xxx --channelId=xxx --userId=xxx --audioFile=./test_data/demo.pcm --sampleRate=16000 --numOfChannels=1

Some import call sequence

    1. about audio frame observer:

set_playback_audio_frame_before_mixing_parameters MUST be call before register_audio_frame_observer

sample code:

localuser.set_playback_audio_frame_before_mixing_parameters(1, 16000)
audio_observer = BizAudioFrameObserver()
localuser.register_audio_frame_observer(audio_observer)

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

agora_python_server_sdk-2.0.3.tar.gz (36.2 kB view details)

Uploaded Source

File details

Details for the file agora_python_server_sdk-2.0.3.tar.gz.

File metadata

File hashes

Hashes for agora_python_server_sdk-2.0.3.tar.gz
Algorithm Hash digest
SHA256 acf806e17533d01a4c79dbf3e26958d5aae48c0770bde647fb495d99ef1c1028
MD5 955a6c3f71dc4fcb17ea7d71fca678e3
BLAKE2b-256 65693425e326a8f5858111a80531d22ac7af9e35fca81df8bf53266a10266fec

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page