Python Client for FlowDock API
This is a simple client and command-line utility to inject messages into the FlowDock API for publishing on the Team Inbox.
import flowdock fdclient = flowdock.FlowDock( api_key='YOUR-API-KEY', app_name='Your app name (defaults to "Python FlowDock")', project='Defaults to nothing') fdclient.post('firstname.lastname@example.org', 'Subject of your post', '<p>HTML body for your post</p>')
You can override module-level constants to avoid having to specify the flowdock.FlowDock arguments every time:
If you do this, you can use an even shorter method:
import flowdock flowdock.post('email@example.com', 'Subject of your post', '<p>HTML body for your post</p>')
Other optional keyword arguments to post()
- from_name - a human-readable name to go along with the from_address
- tags - a list of strings to tag this post with
- link - a URL to associate with this post
If you are loading the library from within a Django project, you can put the following settings in your settings.py and python-flowdock will use them as defaults:
This means that the flowdock.post() method will also use these defaults.
Command-line utility: influx
This library also ships with a command-line utility called "influx" that leverages the library. Pass your message content through stdin.
Usage: influx [options] An API Client for FlowDock Options: --api-key=API_KEY The API key for the FlowDoc API --app-name=APP_NAME The application name to post as --from-address=FROM_ADDRESS An email address to send the post from --from-name=FROM_NAME The real name associated with the email address --subject=SUBJECT The subject of the post --project=PROJECT The human-readable identifier for more detailed categorization --tag=TAGS One argument for each tag to tag this post with --link=LINK A URL to associate with this post --show-traceback --version show program's version number and exit -h, --help show this help message and exit