Coder Social home page Coder Social logo

python-purple's Introduction

python-purple

Build Status

Python bindings to libpurple.

Note

This is Flare's attempt at reviving python-purple. The library was forked from fahhem/python-purple, which was a short-lived fork of Anderson Briglia's original work.

Notable changes since then include:

  • Moving to Python 3
  • Adding tests
  • (ongoing) Refactoring the API
  • Type annotations for use with mypy.
  • High-level PurpleClient for an easier-to-use API.

No API stability promises are made at this time. However, whatever is tested (see purple/tests) can be considered somewhat stable.

Examples

See simpleclient.py for usage examples.

Hacking on python-purple

Setting up

python-purple tests use libpurple's null protocol. Your distro probably does not ship it by default. For guidance on how to build it yourself, take a look at .travis.yml.

Makefile targets

  • test: Run all tests.
  • format: Format the source code with black.
  • run-simpleclient: Run simpleclient from the virtualenv.

Tips

Here are some notes that may help you while working on python-purple. I found that some of these things are not entirely obvious so it may help to read them before getting started.

  • Cast char* to bytes safely using cdef bytes py_variable = c_variable or None

Roadmap

  • Use kwargs for all callbacks.
  • Strings should be used instead of bytes wherever it makes sense.
  • Good test coverage.

Changelog

See CHANGELOG.md.

python-purple's People

Contributors

aviau avatar brunoabinader avatar fahhem avatar isra17 avatar mlefebvre avatar xshill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-purple's Issues

Suitability for implementing chat protocols in Python

I notice there is a simple chat client example included in the repo.

Are these bindings adequate for implementing chat protocols using libpurple, or are they only suitable for writing clients?

The docs don't clarify, but that might just be my lack of context/understanding.

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.