A command-line interface for Optimizely Projects
Project description
optimizely-cli is a command-line interface for Optimizely projects.
It aims to give you quick access to your experiment data as well as store a local copy of your data so that you can manage and track changes in the version control system of your choice.
System Requirements
optimizely-cli runs on Linux and Mac OS X, and requires Python 2.7.x+. It may work on other versions of Python.
Installation
Install or upgrade optimizely-cli using pip:
$ pip install –upgrade optimizely-cli
If you get some sort of error about TLS versions like this:
“There was a problem confirming the ssl certificate: [SSL: TLSV1_ALERT_PROTOCOL_VERSION]”
Then install a newer version of pip and then install again:
$ curl https://bootstrap.pypa.io/get-pip.py | python
Getting Started
To use optimizely-cli, you need to link it to your Optimizely account. The quickest way to get started is to run the opti init command and follow the instructions:
$ opti init First visit https://app.optimizely.com/v2/profile/api to create a new access token Enter the token you created here: Verifying token... Token is valid Credentials written to .optimizely-credentials.json Do not add this file to version control! It should stay private Checking for an existing project... Successfully created project (id: <project_id>) Config file written to .optimizely.json
You can move .optimizely-credentials.json to your home directory (the opti tool will look there as long as your project is under your home):
$ mv .optimizely-credentials.json ~/
Or add it to your .gitignore file like this:
$ echo .optimizely-credentials.json >> .gitignore
Don’t commit your credentials to version control!
Usage
For a full list of commands, just type opti at the command line. Here are some examples of available sub-commands:
attribute |
Manage Audience Attributes |
audience |
Manage Optimizely audiences |
environment |
Manage Environments |
event |
List, create, and manage Optimizely events |
experiment |
List, create, and manage Optimizely experiments |
feature |
Manage Features |
group |
Manage Optimizely exclusion groups |
init |
Link an Optimizely project with your repository |
project |
List, create, and manage Optimizely projects |
pull |
Pull down the current state of an Optimizely project |
push |
Push back local data to an Optimizely project |
Examples
Get a list of projects
$ opti project list
Create a new project
$ opti project create
Get a list of events
$ opti event list
Create a new event
$ opti event create new_event
Pull all Optimizely experiment data and write them to a local optimizely/ directory
$ opti pull
Collect changes to your local optimizely/ directory and apply them your data in Optimizely
$ opti push
Command Completion
The opti utility can complete your commands. Just add the following to your .bashrc:
eval “$(_OPTI_COMPLETE=source opti)”
Contributing
Please see our Contributing Guidelines.
Additional Code
Please see Additional Code.
Any use of the Optimizely Service is subject to our Terms of Service or the separate, written agreement between your company and Optimizely (if any).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file optimizely-cli-0.3.0.tar.gz
.
File metadata
- Download URL: optimizely-cli-0.3.0.tar.gz
- Upload date:
- Size: 19.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64259ece76546e9640baf4489a6e0ef7f2a85a53c889cd84d30a6ff6720541d0 |
|
MD5 | 641f4428a3386106e78f8a7fd8c7ca7c |
|
BLAKE2b-256 | baefb8ed388d89aa42f798eb50bf6deca100e4bdf927132f74b46960093e3aff |
File details
Details for the file optimizely_cli-0.3.0-py2-none-any.whl
.
File metadata
- Download URL: optimizely_cli-0.3.0-py2-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/2.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ea521abe280ae23fdcee13c9954e1412eaf02cca093d6f83a78871c9512a177 |
|
MD5 | fb246d7bcf2dd987390f2fd7da866696 |
|
BLAKE2b-256 | 6154c5a51267dc2bc006475450b8e8737911db7df9cbe82954ce3849e9e543a9 |