Acquia Cloud API client.
Project description
# Python Library for Acquia's Cloud API
This is a python client for using the [Acquia Cloud API](https://cloudapi.acquia.com/).
[![PyPI Version](https://img.shields.io/pypi/v/acapi.svg)](https://pypi.org/project/acapi/)
[![Requirements Status](https://requires.io/github/skwashd/python-acquia-cloud/requirements.svg?branch=master)](https://requires.io/github/skwashd/python-acquia-cloud/requirements/?branch=master)
[![Coverage Status](https://coveralls.io/repos/skwashd/python-acquia-cloud/badge.svg?branch=master&service=github)](https://coveralls.io/github/skwashd/python-acquia-cloud?branch=master)
[![Build Status](https://travis-ci.org/skwashd/python-acquia-cloud.png)](https://travis-ci.org/skwashd/python-acquia-cloud)
## Installation
### Installing With pip (recommended)
`pip install acapi`
## Manual Installation
```
$ git clone git@github.com:skwashd/python-acquia-cloud.git acapi
$ cd acapi
$ ./setup.py build && ./setup.py install
```
## Examples
```python
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](http://davehall.com.au).
See [LICENSE](LICENSE).
[1]: https://requires.io/github/skwashd/python-acquia-cloud/requirements/
[2]: https://requires.io/github/skwashd/python-acquia-cloud/requirements.svg?style=flat
This is a python client for using the [Acquia Cloud API](https://cloudapi.acquia.com/).
[![PyPI Version](https://img.shields.io/pypi/v/acapi.svg)](https://pypi.org/project/acapi/)
[![Requirements Status](https://requires.io/github/skwashd/python-acquia-cloud/requirements.svg?branch=master)](https://requires.io/github/skwashd/python-acquia-cloud/requirements/?branch=master)
[![Coverage Status](https://coveralls.io/repos/skwashd/python-acquia-cloud/badge.svg?branch=master&service=github)](https://coveralls.io/github/skwashd/python-acquia-cloud?branch=master)
[![Build Status](https://travis-ci.org/skwashd/python-acquia-cloud.png)](https://travis-ci.org/skwashd/python-acquia-cloud)
## Installation
### Installing With pip (recommended)
`pip install acapi`
## Manual Installation
```
$ git clone git@github.com:skwashd/python-acquia-cloud.git acapi
$ cd acapi
$ ./setup.py build && ./setup.py install
```
## Examples
```python
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](http://davehall.com.au).
See [LICENSE](LICENSE).
[1]: https://requires.io/github/skwashd/python-acquia-cloud/requirements/
[2]: https://requires.io/github/skwashd/python-acquia-cloud/requirements.svg?style=flat
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
acapi-0.7.0.tar.gz
(11.1 kB
view hashes)
Built Distribution
acapi-0.7.0-py2.py3-none-any.whl
(20.5 kB
view hashes)
Close
Hashes for acapi-0.7.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1eb8d4eb9fb780a5602e05e7b44ddd64aa6b06be560b93d175deb0610d590676 |
|
MD5 | 87276b230750813d92b9e3b97f08e036 |
|
BLAKE2b-256 | b45212abb32bc9fe8466f9fcb366ff6269341af100813f350a1abb1460b9f94f |