Python¶
Apptimize supports server-side experimentation and release management through several server-oriented SDKs including Python.
Our server-side SDKs support programmatic experimentation (Dynamic Variables and Code Blocks) as well as Feature Flags.
EU Cloud Site¶
Use the configAttributes
flag to set your Apptimize region to EUCS if you are integrated in our EU Cloud site.
configAttributes = {'apptimize_region' : 'eucs'}
Apptimize.setup('<YOUR_APP_KEY>', configAttributes)
SDK Installation¶
You can install our Python Server-Side SDK as a standalone downloadable tar package or by using PyPi.
Download and install locally
To install the SDK by downloading the tar package and installing it locally, you need to sign in to the Apptimize dashboard. You’ll see a welcome page that asks for the name of your app. After entering all your info, you’ll see these installation instructions again.
Download the latest Python SDK from the SDK Download page.
Copy the SDK to your project directory.
Install the package:
pip install Apptimize-<version>.tar.gz
.Delete the copied SDK file
Apptimize-<version>.tar.gz
.In your
.py
file(s), import the SDKfrom apptimize import Apptimize
.
You can find our latest Python API Documentation here.
Install using PyPi
With our Python Server-Side SDK being available from PyPi the installation process is as simple as running pip install for Apptimize
:
$ pip install Apptimize
Note
Using PyPi, you can install Apptimize starting with 1.2.29.
See also
- More information about Apptimize on PyPi
Initializing Apptimize¶
To initialize Apptimize, make the following call with the App Key associated to your app, which can be found in the Install tab of your Dashboard.
Apptimize.setup("<appkey>")