GithubHelp home page GithubHelp logo

chunnel's Introduction

Chunnel

A python client for phoenix channels.

Usage

from chunnel import Socket

socket = Socket('ws://example.com/socket', params={'token': 'blah'})
async with socket:
    channel = socket.channel('room:lobby, {})
    await channel.join()
    incoming = await channel.receive()
    await incoming.reply({'blah': 'whatever'})
    msg = await channel.push('something', {})
    response = await msg.response()

Status

Chunnel is very much in alpha status right now. It's API can (and probably will) change, there's many edge cases that are not currently handled, and many TODOs littered about the code.

Currently implemented:

  • Joining channels
  • Receving messages
  • Sending messages

Not implemented:

  • Documentation
  • Incoming channel leave messages
  • Connection errors/reconnecting.
  • Much other error handling
  • Presence
  • Probably other things

Pull requests welcome.

Thanks

Some thanks to:

  • @ChaseGilliam on Twitter for the name.
  • Various others for suggestions.

chunnel's People

Contributors

acburigo avatar obmarg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

chunnel's Issues

Missing license

Hey there! I'd like fork this repo and build something with it, but there's no license, so I hesitated. Do you mind adding one? Thanks!

is this still relevant?

trying with your api, but seems like it's not relevant anymore. Has anyone tried this recently?

Binary response breaks join

Hi
I am trying to use chunnel for connecting to a pheonix channel, but the server responds with a binary response instead of a json when join request is sent. what am I doing wrong? the response is not a proper json and chunnel breaks on channel join.
I took the url and parameters from the website that implemented the channel connection in react.

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.