Skip to main content

fabric-digitalocean

https://travis-ci.org/andrewsomething/fabric-digitalocean.svg?branch=master

fabric-digitalocean is a collection of tools aiming to make it easy to use Fabric and DigitalOcean together.

It was inspired by fabric-aws

Installation

pip install fabric-digitalocean

Usage

With fabric-digitalocean, you can decorate Fabric tasks to run on a set of DigitalOcean Droplet. The @droplets decorator can take a list of Droplet IDs, a tag, or a region as an argument. If you use a tag or region, it will be expanded to a list of all Droplets with that tag applied or in that region. They can also be used together.

The environmental variable FABRIC_DIGITALOCEAN_TOKEN must contain a DigitalOcean API token.

See below for an example:

from fabric.api import task, run
from fabric_digitalocean.decorators import droplets


@task
@droplets(ids=[8043964, 7997777])
def task_by_ids():
    run('hostname')
    run('uptime')


@task
@droplets(tag='demo')
def task_by_tag():
    run('hostname')
    run('uptime')


@task
@droplets(region='nyc3')
def task_by_region():
    run('hostname')
    run('uptime')


@task
@droplets(region='nyc2', tag='demo')
def task_by_both():
    run('hostname')
    run('uptime')

Testing

To run the test suite, use:

nosetests -v --with-coverage --cover-package=fabric_digitalocean

Metadata

Release files for fabric-digitalocean 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for fabric-digitalocean 0.1
File Interpreter ABI Platform Actions
fabric_digitalocean-0.1-py2-none-any.whl Python 2 none any Details for fabric_digitalocean-0.1-py2-none-any.whl

Release files / fabric_digitalocean-0.1-py2-none-any.whl

Download URL fabric_digitalocean-0.1-py2-none-any.whl
Size 6.0 kB
Tags Python 2
SHA-256 checksum
How to use checksums
aab50abd06a05e6f052b5ad2da2de283570bbff985c9c1960e4e9d0ae3f776c9
BLAKE2b-256 checksum
How to use checksums
556f5ffb1dd66ea695fe806b1f0199129503df876041d7c2f3997c7bfc64c7d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for fabric-digitalocean 0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page