Fleepy – A Pythonic Fleep API Client

For whoever doesn’t know, Fleep is a chat application that focuses on being simple, fast and has the ambition of replacing your email. Having used Fleep, Slack and Hipchat, they all have their places. But if you or your team deal with a lot of contacts outside your organization, Fleep it’s certainly something to consider as E-Mail integration is quite a powerful feature as it allows you to add email-based guests to conversation without requiring them to have a Fleep account.

That said, I am developing a ongoing project and for that I would need access to Fleep API. It is a simple RESTful API, however I could not find a proper Python client for it. So I coded this library in a couple days that access Fleep.

Its usage is quite simple and tries to stay as closely to the API as possible.

Here are a few examples:

Creating a chat room with topic and an initial message.

The example below logins, creates a chat room with three people and sends a message. The message uses some of Fleep styling features, check them out here.

 

from fleepy import Fleepy
 
api = Fleepy()
api.account.login("your@email.com", "yourpassword")
 
 
api.conversation.create(
    topic='This is a Room Topic',
    emails=['your@email.com', 'guest1@email.com', 'guest2@email.com'],
    message="""*Hello*, everyone!
 
    Something has just been posted in our Issue tracker.
 
    http://issue.tracker.com<>
    """)
 
api.account.logout()

Uploading a file

from fleepy import Fleepy
 
api = Fleepy()
api.account.login("your@email.com", "yourpassword")
 
api.file.upload('/path/to/afile.jpg')
api.account.logout()

Check out the code at https://github.com/nicholasamorim/fleepy and let me know of any issues or features you might like. :)

Use Facebook to Comment on this Post

Comments are closed.

Post Navigation