Setup and dependency installations

(Windows)

Python doesn’t come pre installed on Windows. You need to download and install in manually. You can follow this guide to download Python 2.7. You can also install the latest version (3.5) from their website. We support both versions, so that should not be a problem. Set up Python by running the file you have just downloaded. By default it will be stored on

C:\ Python27\

Remember to check the “Add python.exe to Path” option during installation. You will need a text editor, for example sublime, atom, vim.

STEP 1: Check if pip is installed on your system. Run this command

>python -m pip --version

STEP 2: Installing pip

To install pip go to https://bootstrap.pypa.io/get-pip.py and save the file if you are prompted to do so. If the code appears on the browser, copy and paste it to your text editor and save it as get-pip.py

Open the terminal, locate the file you have just saved and run it with administrative privileges

>cd Downloads

Downloads> python get-pip.py

STEP 3: Start developing

To start working on our API’s you need to download Africa’s Talking API gateway. This is where pip comes in.

First create a working directory:

>md projectName

>cd projectName\

projectName> python -m pip install africastalkinggateway

(Linux - *unix variants / mac)

The latest versions of CentOs, Fedora, RedHat Enterprise and Ubuntu come with Python 2.7 installed.

STEP 1: Check the version of Python you have installed. Run this command

$ python --version

STEP 2: Check if pip is installed on your system

$ pip --version

STEP 3: Installing pip

Pip is a package management system used to install and manage software packages.To install pip go to https://bootstrap.pypa.io/get-pip.py and save the file if you are prompted to do so. If the code appears on the browser, copy and paste it to your text editor and save it as get-pip.py

Open the terminal, locate the file you have just saved and run it with administrative privileges.

$cd Downloads

Downloads $ sudo python get-pip.py

After the program runs, use the following command to make sure that pip was installed correctly.

$pip --version

STEP 4: Start developing

To start working on our API’s you need to download Africa’s Talking API gateway. This is where pip comes in.

First create a working directory

$mkdir projectName

$cd

$cd projectName

Make sure you store the dependencies and installed packages in a text file with the pip freeze > file.txt

$pip install africastalkinggateway && pip freeze > at-freeze.txt

For python 3.+ you can install the gateway as follows:

$pip3 install africastalkinggateway && pip3 freeze > at3-freeze.txt

With your environment set up, you are now ready to start writing your application.

results matching ""

    No results matching ""