Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #15563
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <kwatch@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.000 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'subject:ANN': 0.02; 'typing': 0.04; 'subject:Python': 0.06; 'supported.': 0.07; 'url:pypi': 0.08; 'executed': 0.09; 'recipe': 0.09; 'release,': 0.09; 'ssh': 0.09; 'configure': 0.10; 'subject:] ': 0.15; '10022': 0.16; 'bugfix': 0.16; 'recipes': 0.16; 'subject: \n ': 0.16; 'subject:similar': 0.16; 'sudo': 0.16; '\xa0def': 0.16; '\xa0this': 0.16; '\xa0you': 0.16; 'wrote:': 0.18; 'converted': 0.18; 'instance': 0.18; 'received:209.85.212.46': 0.23; 'received:mail-vw0-f46.google.com': 0.23; 'enhancements': 0.23; 'gcc': 0.23; 'changed': 0.24; 'command': 0.24; 'removed.': 0.24; 'sender:addr:gmail.com': 0.25; 'skip:[ 10': 0.27; 'remote': 0.27; 'sat,': 0.28; 'import': 0.28; 'fixed': 0.28; 'message- id:@mail.gmail.com': 0.29; 'class': 0.29; "'build'": 0.30; '22,': 0.30; 'none,': 0.30; 'object.': 0.30; 'servers.': 0.30; "skip:' 10": 0.30; 'nov': 0.31; 'pm,': 0.31; 'skip:( 20': 0.31; 'hi,': 0.31; 'changes': 0.32; 'subject:[': 0.32; 'to:addr:python-list': 0.32; 'rule': 0.34; 'received:209.85.212': 0.34; 'automation': 0.34; 'deploy': 0.34; 'similar': 0.35; 'object': 0.35; 'url:python': 0.35; 'file': 0.36; '...': 0.36; 'useful': 0.36; '(not': 0.37; 'using': 0.37; 'necessary.': 0.38; 'overview': 0.38; 'run': 0.38; 'received:google.com': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'skip:\xa0 10': 0.38; 'tool': 0.39; 'to:addr:python.org': 0.39; 'release': 0.40; 'files': 0.40; 'received:209': 0.40; 'your': 0.61; '2011': 0.62; 'share': 0.66; 'fun!': 0.67; 'details.': 0.69; 'confirm': 0.69; 'url:http': 0.72; '***': 0.73; 'login,': 0.84; 'subject:tool': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=7WO1jGSbM79uLBlu45iRuv7bJVdZo3BeBxkGiRFlvuU=; b=rHXhockfeDJfZn+R6W+LJiLKUqqs398G3SdaQYO1iDb8c1GgKWmj9Fkfs1fWpx0Kcv 8TB8YlyVxoMQAGCaOC1Tkmfw1ICRYbDTSklMsvLLV0yx9017MtEOc9d5dYRQZuX19Ox6 HegMSrxi4Htke5y6KRvQAiw/dkC041lp+SikQ= |
| MIME-Version | 1.0 |
| Sender | kwatch@gmail.com |
| Date | Fri, 11 Nov 2011 06:54:02 +0900 |
| X-Google-Sender-Auth | Hrz6xehzZPwmlXT4RuMnTbN6Pwg |
| Subject | [ANN] pyKook 0.7.1 - task automation tool for Python, similar to Rake or Ant |
| From | Makoto Kuwata <kwa@kuwata-lab.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Content-Transfer-Encoding | quoted-printable |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2625.1320962045.27778.python-list@python.org> (permalink) |
| Lines | 224 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1320962045 news.xs4all.nl 6886 [2001:888:2000:d::a6]:47226 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:15563 |
Show key headers only | View raw
I have released pyKook
0.7.1.http://pypi.python.org/pypi/Kook/http://www.kuwata-lab.com/kook/http://www.kuwata-lab.com/kook/pykook-users-guide.html
pyKook is a task automation tool for Python, similar to Rake or Ant.
Bugfix in this release----------------------
* Fixed to include 'kook/books/*.py' into .egg file
--regads,makoto kuwata
On Sat, Nov 5, 2011 at 3:06 PM, Makoto Kuwata <kwa@kuwata-lab.com> wrote:
> Hi,
>
> I have released pyKook 0.7.0.
> http://pypi.python.org/pypi/Kook/
> http://www.kuwata-lab.com/kook/
> http://www.kuwata-lab.com/kook/pykook-users-guide.html
>
> In this release, you can run commands on remote machines using ssh.
> This is very useful to deploy your application.
>
>
> pyKook Overview
> ---------------
>
> pyKook is a task automation tool for Python, similar to Rake or Ant.
>
> (Kookbook.py):
>
> kookbook.default = 'build'
>
> ## task
> @recipe(None, ['hello'])
> def build(c):
> """build all"""
> pass
>
> ## file
> @recipe('hello', ['hello.o'])
> def file_hello(c):
> """build 'hello' from 'hello.o'"""
> system(c%'gcc -o $(product) $(ingred)')
>
> ## rule
> @recipe('*.o', ['$(1).c', '$(1).h'])
> def file_o(c):
> system(c%'gcc -c $(ingred)')
>
>
> Command-line:
>
> bash> kk # or pykook
> $ gcc -c hello.c
> ### *** hello.o (recipe=file_o)
> $ gcc -c hello.c
> ### ** hello (recipe=file_hello)
> $ gcc -o hello hello.o
> ### * build (recipe=build)
>
> See http://www.kuwata-lab.com/kook/pykook-users-guide.html for details.
>
>
> Enhancements in this release
> ----------------------------
>
> * (EXPERIMENTAL!!) Remote command execution (ssh and sftp) is available.
> This is very useful to deploy your application into servers.
>
> Ex (Kookbook.py)::
>
> from kook.remote import Remote
> remote = Remote(
> hosts = ['www1', 'www2', 'user3@www3:10022'],
> port = 22,
> user = 'user1',
> #password = None, # for login, '~/.ssh/id_rsa' and sudo
> passphrase = None, # only for '~/.ssh/id_rsa'
> sudo_password = 'xxx', # only for sudo command
> )
>
> @recipe
> @remotes(remote)
> def hostinfo(c):
> """show hostname"""
> ssh = c.ssh
> ssh('hostname') # run command with ssh
> ssh('whomai') # run command with ssh
> ssh.sudo('whoami') # run command with sudo
>
> @recipe
> @remotes(remote)
> def exchange(c):
> """upload and download files"""
> ssh = c.ssh
> with ssh.pushd('work/apps'):
> ssh.get('file.remote') # download a file
> ssh.put('file.local') # upload a file
> ssh.mget('remote.*') # download files
> ssh.mput('local.*') # upload files
>
> Notice that you must configure ssh at first and confirm that
> you can log into servers without typing password::
>
> bash> ssh user1@www1
> bash> ssh user1@www2
> bash> ssh -p 10022 user3@www3
> bash> kk hostinfo
> ### * showinfo (recipe=showinfo)
> [user1@www1]$ hostame
> www1
> [user1@www1]$ whoami
> user1
> [user1@www1]$ sudo whoami
> root
> [user2@www2]$ hostame
> www2
> [user2@www2]$ whoami
> user2
> [user2@www2]$ sudo whoami
> root
> [user3@www3]$ hostame
> www3
> [user3@www3]$ whami
> user3
> [user3@www3]$ sudo whoami
> root
>
> Currently commands are executed sequencially (not in parallel).
>
> * (EXPERIMENTAL!!) Password object supported.
> Password object asks you to enter password in prompt when necessary.
>
> Ex (Kookbook.py)::
>
> from kook.remote import Remote, Password
> remote = Remote(
> hosts = ['user1@www1:22'],
> #password = Password('login'),
> passphrase = Password('~/.ssh/id_rsa'),
> sudo_password = Password('sudo command')
> )
> #
> @recipe
> @remotes(remote)
> def remote_test(c):
> ssh = c.ssh
> ssh.sudo('whoami')
>
> Output example::
>
> bash> kk remote_test
> ### * remote_test (recipe=remote_test)
> Password for ~/.ssh/id_rsa:
> Password for sudo command:
> [user1@www1]$ sudo whoami
> root
>
> It is easy to share password object.
>
> Ex (Kookbook.py)::
>
> from kook.remote import Remote, Password
> passwd = Password()
> remote = Remote(
> hosts = ['user1@www1:22'],
> password = passwd,
> passphrase = passwd,
> sudo_password = passwd,
> )
>
>
> Changes in this release
> -----------------------
>
> * Category class is changed to convers all instance methods into staticmethods.
>
> Ex (Kookbook.py):
>
> class apache(Category):
> @recipe
> def start(c):
> system('apachectl start')
>
> ## start() is converted into staticmethod
> assert type(apache.__dict__['start']) == staticmethod
> from types import FunctionType
> assert type(apache.start) == FuntionType
>
> This makes execution of other recipes in category easier::
>
> class apache(Category):
> @recipe
> def start(c):
> ...
> @recipe
> def stop(c):
> ...
> @recipe
> def restart(c):
> apache.start(c) # execute other recipe
> apache.stop(c) # execute other recipe
>
> * (internal) kook.config.stdout and kook.config.stderr are removed.
>
>
>
> See http://www.kuwata-lab.com/kook/pykook-CHANGES.txt for details.
>
>
> Have fun!
>
> --
> regards,
> makoto kuwata
>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
[ANN] pyKook 0.7.1 - task automation tool for Python, similar to Rake or Ant Makoto Kuwata <kwa@kuwata-lab.com> - 2011-11-11 06:54 +0900
csiph-web