Skip to main content

A JavaScript library for Flask-Split.

Project description

Flask-Split-JS version 0.1.0

https://travis-ci.org/FelixLoether/flask-split-js.png?branch=master

Flask-Split-JS offers utilities for using Flask-Split from the browser using JavaScript.

Setup

On top of the Flask-Split setup, you need to register the Flask-Split-JS blueprint to your application:

from flask import Flask
from flask.ext.split_js import split_js

app = Flask(__name__)
app.register_blueprint(split_js)

and add the JavaScript library to your template:

<script src="/path/to/jquery.js"></script>
<script src="{{ url_for('static/js/flask-split.min.js') }}"></script>

jQuery is required for the JavaScript library to work.

API Reference

FlaskSplit.ab_test(experiment_name, alternatives…, callback)

A port of Flask-Split’s ab_test function. When the alternative has been decided, the callback function is called with the chosen alternative as its sole argument.

Invalid arguments cause errors to be thrown.

FlaskSplit.finished(experiment_name, reset=true)

A port of Flask-Split’s finished function.

Invalid arguments cause errors to be thrown.

Resources

Changes

A list of changes done in each version.

0.1.0

Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Split-JS-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file Flask-Split-JS-0.1.0.tar.gz.

File metadata

File hashes

Hashes for Flask-Split-JS-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c3954f0ed6570997a48ded85860cff4c32fe33f710ca5de58fd8da587bc04ca6
MD5 5b88eaa144cd659a5d810408c7b07f09
BLAKE2b-256 08889c32574288b8e712bc43dcc8ba4857712e3c63d8d3ea4f8624be84592b49

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page