All Projects → abbat → pytoxcore

abbat / pytoxcore

Licence: GPL-3.0 license
Python binding for ToxCore

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to pytoxcore

spec
Tox Protocol Specification
Stars: ✭ 29 (-21.62%)
Mutual labels:  tox, toxcore
minitox
Minimal client for Tox
Stars: ✭ 65 (+75.68%)
Mutual labels:  tox, toxcore
rustybot
A Tox groupchat trivia bot
Stars: ✭ 13 (-64.86%)
Mutual labels:  tox, toxcore
jvm-toxcore-c
JVM (Java/Scala/Kotlin) bindings to toxcore
Stars: ✭ 33 (-10.81%)
Mutual labels:  tox, toxcore
ToxBlinkenwall
ToxBlinkenwall - VideoConferencing with Tox
Stars: ✭ 16 (-56.76%)
Mutual labels:  tox, toxcore
oldiconutil
A command-line tool to postprocess iconutil-generated .icns files to make them compatible with Mac OS X 10.5
Stars: ✭ 25 (-32.43%)
Mutual labels:  abandoned
fxtest-jenkins-pipeline
DEPRECATED
Stars: ✭ 39 (+5.41%)
Mutual labels:  abandoned
homeassistant-coronavirus-hessen
[Unmaintained] Home Assistant component to scrape the current SARS-CoV-2 data for the German state of Hessen from the website of the Hessisches Ministerium für Soziales und Integration.
Stars: ✭ 15 (-59.46%)
Mutual labels:  abandoned
openwrt-brook-tproxy
Abandoned, DO NOT star and fork!
Stars: ✭ 31 (-16.22%)
Mutual labels:  abandoned
ansible-blackbox-exporter
Blackbox prober exporter
Stars: ✭ 60 (+62.16%)
Mutual labels:  tox
webping
🚦 Python script to monitor web pages.
Stars: ✭ 20 (-45.95%)
Mutual labels:  abandoned
firefoxos-loop-client
DEPRECATED - Firefox OS client for the Loop service
Stars: ✭ 27 (-27.03%)
Mutual labels:  abandoned
vmw.vco
Python bindings for VMware Orchestrator
Stars: ✭ 13 (-64.86%)
Mutual labels:  abandoned
murmur
DEPRECATED - A webapp for collecting speech samples for voice recognition testing and training
Stars: ✭ 20 (-45.95%)
Mutual labels:  abandoned
qTox
Powerful Tox chat client that follows the Tox design guidelines.
Stars: ✭ 28 (-24.32%)
Mutual labels:  tox
B2GOS-community
DEPRECATED - Tasks management for the B2G OS working groups
Stars: ✭ 11 (-70.27%)
Mutual labels:  abandoned
looong
Discovery of Long Parameter List
Stars: ✭ 16 (-56.76%)
Mutual labels:  tox
go-monitor
a simple and extensible way to build monitorizable go process via HTTP.
Stars: ✭ 33 (-10.81%)
Mutual labels:  abandoned
goga
A fully RESTful API from any existing PostgreSQL database written in Rust
Stars: ✭ 17 (-54.05%)
Mutual labels:  abandoned
ansible-role-fail2ban
Install and configure fail2ban on your system.
Stars: ✭ 42 (+13.51%)
Mutual labels:  tox

⚠️ This project is abandoned due no any progress in libtoxcore for a year - unfortunately seems Tox project is dead :(


pytoxcore

Build Status Coverity status

Python binding for ToxCore.

Download / Install

Compile from sources

$ python setup.py build
$ python setup.py install

To compile with TokTok toxcore implementation:

$ CFLAGS="-DTOX_TOKTOK" python setup.py build

Usage

See Echo Bot Example.

Documentation

Most methods of ToxCore, ToxAV and ToxDNS classes well documented in original tox.h, toxav.h and toxdns.h.

Also you can get help from extension itself:

$ python
>>> from pytoxcore import ToxCore, ToxAV, ToxDNS
>>> help(ToxCore)

Additional non libtoxcore api methods and callbacks described below.

ToxCore

tox_keypair_new

Return new (public_key, secret_key) tuple. Used to create new tox account.

tox_keypair_new()
tox_public_key_restore

Return public key restored from secret key.

tox_public_key_restore(secret_key)
tox_nospam_new

Return new random nospam value as hex-string.

tox_nospam_new()
tox_address_new

Return ToxID from public key and nospam value.

tox_address_new(public_key, nospam)
tox_address_check

Check given ToxID and throws exception if address is invalid.

tox_address_check(address)
tox_sendfile

Send file identified by path to a friend like system sendfile. Return file_number on success like original tox_file_send. Call tox_sendfile_cb callback (see below).

tox_sendfile(friend_number, kind, path, filename, timeout)
tox_sendfile_cb

This event is triggered when tox_sendfile call finished.

tox_sendfile_cb(friend_number, file_number, path, filename, status)

status may be one of:

  • TOX_SENDFILE_COMPLETED - call finished successfully;
  • TOX_SENDFILE_TIMEOUT - send timeout occured;
  • TOX_SENDFILE_ERROR - filesystem, toxcore or other error.
tox_recvfile

Receive file from a friend and store it to path. Call tox_recvfile_cb callback (see below).

tox_recvfile(friend_number, file_number, file_size, path, filename, timeout)
tox_recvfile_cb

This event is triggered when tox_recvfile call finished.

tox_recvfile_cb(friend_number, file_number, path, filename, status)

status may be one of:

  • TOX_RECVFILE_COMPLETED - call finished successfully;
  • TOX_RECVFILE_TIMEOUT - receive timeout occured;
  • TOX_RECVFILE_ERROR - filesystem, toxcore or other error.

ToxAV

toxav_video_frame_format_set

Set video frame format for toxav_video_receive_frame_cb callback (see below).

toxav_video_frame_format_set(format)

Format may be one of:

  • TOXAV_VIDEO_FRAME_FORMAT_BGR - BGR frame format;
  • TOXAV_VIDEO_FRAME_FORMAT_RGB - RGB frame format;
  • TOXAV_VIDEO_FRAME_FORMAT_YUV420 - (default) YUV420 format.
toxav_video_send_frame

Original toxav_video_send_frame method splitted into three to send frame in BGR, RGB and YUV420 (default) formats.

toxav_video_send_bgr_frame(friend_number, width, height, bgr)
toxav_video_send_rgb_frame(friend_number, width, height, rgb)
toxav_video_send_yuv420_frame(friend_number, width, height, y, u, v)
toxav_video_receive_frame_cb

This event is triggered when a video frame received. First for RGB/BGR video frame format, second for YUV420 (default).

toxav_video_receive_frame_cb(friend_number, width, height, rgb)
toxav_video_receive_frame_cb(friend_number, width, height, y, u, v, ystride, ustride, vstride)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].