acapi-0.9.0
توضیحات
Acquia Cloud API client.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | acapi-0.9.0 |
| نام | acapi |
| نسخه کتابخانه | 0.9.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Dave Hall |
| ایمیل نویسنده | me@davehall.com.au |
| آدرس صفحه اصلی | http://github.com/skwashd/python-acquia-cloud |
| آدرس اینترنتی | https://pypi.org/project/acapi/ |
| مجوز | MIT |
# Python Library for Acquia's Cloud API
This is a python client for using the [Acquia Cloud API](https://cloudapi.acquia.com/).
[](https://pypi.org/project/acapi/)
[](https://requires.io/github/skwashd/python-acquia-cloud/requirements/?branch=master)
[](https://coveralls.io/github/skwashd/python-acquia-cloud?branch=master)
[](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
نحوه نصب
نصب پکیج whl acapi-0.9.0:
pip install acapi-0.9.0.whl
نصب پکیج tar.gz acapi-0.9.0:
pip install acapi-0.9.0.tar.gz