Git Product home page Git Product logo

fastly-python's Introduction

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)

fastly-python's People

Contributors

zacman85 avatar brianchoate avatar aspires avatar tonytan4ever avatar

Watchers

rosa maria palacios juncosa avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.