Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Python client library for Fastly.
branch: master

Merge pull request #5 from tonytan4ever/master

Python 3.3 compatble request.
latest commit a3dfb4ee56
Christopher Zacharias zacman85 authored

A Python client library for Fastly


import fastly

# Connects to Fastly using API key.
client = fastly.connect("your-api-key")

# Need to fully authenticate to access all features. 
client.login("", "h4x0rp4ssw0rd")

# Get your account details.
current_customer = client.get_current_customer()

# Get your user details.
current_user =  client.get_current_user()

# List all services.
all_services = client.list_services()

# Create a service.
service = client.create_service(,
    comment="A service for testing out the client.")

# Create a new version of the service.
service_version = client.create_service_version(,
    comment="A new version of this service.")

# Create a domain.
domain = client.create_domain(, 
    comment="A new domain.")

# List domains associated with this version.
print client.list_domains(, service_version.number)

# Delete the domain we just created.
client.delete_domain(, service_version.number,
Something went wrong with that request. Please try again.