This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Simple, flexible, and powerful programmatic farm management.

Useful for automation teams with highly-customized builds.

License

This module is licensed under the MIT License.

Installation

$ python -m pip install artisan

Usage

This example is given with the following .artisanrc configuration:

[artisan]
allow-sudo=false
allow-max-duration=infinite

[template:localhost-worker]
host=localhost
port=22
username={{INSERT USERNAME HERE}}
password={{INSERT PASSWORD HERE}}

[worker:worker1]
use-template=localhost-worker
label=linux

Running this code from a client machine:

from artisan import Artisan

farm = Artisan(artisanrc = "/path/to/.artisanrc")

# View the farm's options
print(farm.options)

# View the list of workers available to request.
print(farm.workers)

# Request a worker from the farm to do work.
worker = farm.request(duration = 30.0,      # Number of minutes to have the worker.
                      sudo     = False,     # Does the worker need to be sudo-enabled?
                      labels   = ['linux']) # Labels that are required.

# View the contract that the worker is available under.
print(worker.contract)

# View the worker's machine configuration.
print(worker.machine)

# View the environment of the worker
print(worker.environ)

# Set the worker's environment
worker.environ["GREETING"] = "Hello, world!"

# Have the worker execute commands.
job = worker.execute("echo '$GREETING'",
                     blocking = False)

# View the status of the Job
print(job.status)

# Wait for the Job to complete.
job.wait()

# View the output of the Job
print(job.stdout, job.stderr)

# Create and manage files on the machine.
with worker.open_file("test.txt", "w+") as f:
    f.write("This is a test file")

print(worker.listdir())
worker.get_file("test.txt", "/tmp")

# Send a file to the machine.
worker.put_file(__file__)

# Release the worker back into the farm.
worker.release()
Release History

Release History

0.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
artisan-0.0-cp35-none-win_amd64.whl (4.0 kB) Copy SHA256 Checksum SHA256 3.5 Wheel Nov 10, 2016
artisan-0.0.tar.gz (2.5 kB) Copy SHA256 Checksum SHA256 Source Nov 10, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting