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.
Install the EdgeGrid authentication for Python. `
pip install edgegrid-python
`Edit this code with the variables from your credentials file. You'll need the values for the tokens from your [.edgerc file](🔗).
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.
Install the [virtualenv tool](🔗). `
pip install virtualenv
`Initialize your environment. `
virtualenv myproject
` This installs python, pip, and basic libraries within the project folder, `myproject
`.Activate your environment.
Your prompt will change to show that you are now working in a virtual environment. You'll see something like:
Install libraries for the project.
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: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.
To create the virtual environment, first install `
virtualenv
`. `pip install virtualenv
`Create a folder and activate the virtual environment.
Check out the latest code from the repository. `
git clone
` Navigate to the directory that contains the project.Install the dependencies.