Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

zebrafishlabs/fastly-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A Python client library for Fastly

www.fastly.com

Example:

import fastly

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

# Need to fully authenticate to access all features. 
client.login("[email protected]", "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(current_customer.id,
	"test-service",
	comment="A service for testing out the client.")

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

# Create a domain.
domain = client.create_domain(service.id, 
	service_version.number,
	"www.test.com",
	comment="A new domain.")

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

# Delete the domain we just created.
client.delete_domain(service.id, service_version.number, domain.name)

About

A Python client library for Fastly.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages