Skip to content

faluapp/falu-python

Repository files navigation

Falu Logo

Falu Python

The official Falu Python library, supporting Python 3.7+.

Installation

pip

pip install --upgrade falu

Source

python setup.py install

Requirements

  • Python 3.7+

Documentation

For a comprehensive list of examples, check out the API documentation.

Usage

This library requires your workspace's secret key which is located in Falu's Dashboard.

import os

import falu

falu.api_key = os.environ.get('YOUR_FALU_SECRET_KEY', "fskt_test_...")

# list of messages
messages, error = falu.Messages.get_messages()

print(messages[0].id)

# retrieve a single message

message, error = falu.Messages.get_message(message_id='msg_2mONJ2DZEVRy6jrfP8HUhemd8PJ')

print(message.id)

Per-request Configuration

import falu

# list messages
messages, error = falu.Messages.get_messages(api_key="fskt_test_...", workspace="wksp_...", live=False)

# retrieve a single message
message, error = falu.Messages.get_messages(message_id='msg_2mONJ2DZEVRy6jrfP8HUhemd8PJ', api_key="fskt_test_...",
                                            workspace="wksp_...", live=False)

Development

For any requests, bug or comments, please open an issue or submit a pull request.

The Library is licensed under the MIT license. Refer to the LICENSE file for more information.