Skip to content
This repository has been archived by the owner on May 12, 2020. It is now read-only.

Python Library for the Acquia Cloud API v1. This library is no longer supported as Acquia is dropping support for this API. Please migrate to the Acquia Cloud API v2.

License

Notifications You must be signed in to change notification settings

skwashd/python-acquia-cloud

Repository files navigation

Python Library for Acquia's Cloud API

This is a python client for using the Acquia Cloud API.

PyPI Version Requirements Status Coverage Status Build Status

Installation

Installing With pip (recommended)

pip install acapi

Manual Installation

$ git clone [email protected]:skwashd/python-acquia-cloud.git acapi
$ cd acapi
$ ./setup.py build && ./setup.py install

Examples

import acapi

from pprint import pprint

# Acquia subscription name.
subname = 'example'
# Website domain.
domain = 'example.com'

# Instantiate client using environment variables.
# Set ACQUIA_CLOUD_API_USER and ACQUIA_CLOUD_API_TOKEN accordingly.
c = acapi.Client()

# Get the site object.
site = c.site(subname)

# Get the environments object.
envs = site.environments()

# Print all environments on a subscription.
pprint(envs)

# List the SSH host for each environment.
for env in envs:
    print "Env: {env} SSH Host: {host}".format(env=env, host=envs[env]['ssh_host'])

# Move a domain from stage to production.
envs['prod'].domain(domain).move('test')

# Backup the development environment database and download the dump file.
site.environment('dev').db(subname).backups().create().download('/tmp/backup.sql.gz')

This library was created and maintained by Dave Hall.

See LICENSE.

About

Python Library for the Acquia Cloud API v1. This library is no longer supported as Acquia is dropping support for this API. Please migrate to the Acquia Cloud API v2.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages