Python library for the new Acquia Cloud API v2
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
acapi2
.gitignore
.travis.yml
CHANGELOG.md
LICENSE.txt
MANIFEST.in
README.md
requirements-dev.txt
requirements.txt
setup.cfg
setup.py

README.md

Python Acquia Cloud API v2

Client library to communicate with the Acquia Cloud API V2.

Pablo Fabregat - License

Build Status codecov Say Thanks

Python implementation for the new Acquia API v2 (https://cloud.acquia.com/api-docs/), based on the original acapi Python Library created by Dave Hall (http://github.com/skwashd/python-acquia-cloud)

This library is in an alpha state and can behave very weirdly.

Roadmap

  • Testing testing testing,
  • First alpha goal: get the lib to create environments on demand (Delayed because Acquia's API design),
  • Submit to Pypi

More information coming soon.

Examples

Please bear in mind that the library is being actively developed and most of its functionality is just a reduced set of what it should be.

Minimal request

acquia = Acquia(api_key, api_secret)
application = acquia.application("a47ac10b-58cc-4372-a567-0e02b2c3d470")

print(application["name"])

Using filters

subscription_name = "MySubsName"
filters = "name=" + subscription_name

application = acapi.applications(filters=filters).first()
dev_environment = application.environments()["dev"]

print(dev_environment["id"])

dev_environment.set_php_version("7.0")

more_settings = {
  "max_execution_time": 10,
  "memory_limit": 192,
  "apc": 128,
  "max_input_vars": 1000,
  "max_post_size": 256,
  "sendmail_path": "/usr/bin/sendmail",
  "varnish_over_ssl": false
}

dev_environment.configure(more_settings)