Execution abstraction layer for high-level system scripts.
Project description
Xal is a contextual execution framework for Python. “xal” is the acronym of “eXecution Abstraction Layer”.
Xal helps you create scripts to perform actions on a system, like managing non-Python resources, independantly from the execution context.
The main motivation of this library is about sharing system scripts:
scripts are written with session as argument, they use an high-level abstract API;
sessions are registries, they encapsulate API implementation: local Python shell, Fabric, Salt…
Example
Let’s create a xal-compatible function. It takes the execution context as input argument:
>>> def home_directory_exists(session): ... """Return True if home directory of session's user exists.""" ... return session.dir.exists(session.dir.home)
Then create an execution session. The LocalSession used here is a pre-configured registry:
>>> from xal.session.local import LocalSession >>> session = LocalSession()
Finally run the function in the session:
>>> home_directory_exists(session) True
Ressources
Documentation: https://xal.readthedocs.org
Code repository: https://github.com/benoitbryon/xal
Bugtracker: https://github.com/benoitbryon/xal/issues
Continuous integration: https://travis-ci.org/benoitbryon/xal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.