Python is a programming language that you can use to manage your Akamai services.

## Install Python

Download the Python release compatible with your operating system at <https://www.python.org/downloads/> and install it.

## Authenticate

In order to complete these steps, you need to first [Create authentication credentials](🔗).

Follow these steps to use the `python-edgegrid` authentication handler.

  1. Install the EdgeGrid authentication for Python. `pip install edgegrid-python`

  2. Edit this code with the variables from your credentials file. You'll need the values for the tokens from your [.edgerc file](🔗).

    
  3. Run your code.



You'll see a response like this:



Example API call:



This is an example of an API call to [List available edge server locations](🔗). Change the `baseurl` element to reference an endpoint in any of the [Akamai APIs](🔗).



If your `.edgrc` file has more than one credential set separated with a [header], use the `section =` argument to specify which section from the configuration file contains the desired credentials for your API request.

Access the GitHub repository at [EdgeGrid for Python](🔗).

## Set up a Virtual Environment

A [virtual environment](🔗) is a tool to keep the dependencies required by different projects in separate places. The virtual environment tool in Python is called `virtualenv`.

Learn how to set up a virtual environment and install the correct libraries to achieve a consistent Python development environment.

  1. Install the [virtualenv tool](🔗). `pip install virtualenv`

  2. Initialize your environment. `virtualenv myproject` This installs python, pip, and basic libraries within the project folder, `myproject`.

  3. Activate your environment.

    

    Your prompt will change to show that you are now working in a virtual environment. You'll see something like:

    
  4. Install libraries for the project.

    
  5. Create a `requirements.txt` file to remember the dependencies.

    

    The `requirements.txt` file contains the necessary dependencies for your project. It will look something like this:

    
  6. Check the `requirements.txt` file along with the project code into your repository. If you, or another developer, add functionality that requires a new library, you'll add it to this `requirements.txt` file. That way, when other developers pull the update from the source code repository, they'll be aware of the new dependencies and able to install them easily.

## Developer install

Any developer can use the virtual environment you created. The project setup is straightforward.

  1. To create the virtual environment, first install `virtualenv`. `pip install virtualenv`

  2. Create a folder and activate the virtual environment.

    
  3. Check out the latest code from the repository. `git clone` Navigate to the directory that contains the project.

    
  4. Install the dependencies.