facterpy-0.1


توضیحات

Python library to provide a cached and dictionary-like interface to Puppet's facter utility
ویژگی مقدار
سیستم عامل POSIX
نام فایل facterpy-0.1
نام facterpy
نسخه کتابخانه 0.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Kali Norby
ایمیل نویسنده kali norby at gmail com
آدرس صفحه اصلی https://github.com/knorby/facterpy
آدرس اینترنتی https://pypi.org/project/facterpy/
مجوز BSD
facterpy ======== Python library to provide a cached and dictionary-like interface to [Puppet's facter utility](http://puppetlabs.com/puppet/related-projects/facter). The facter script is run to gather facts, and YAML output is used if pyYAML is installed. The library is compatibile with Python 2 and Python 3 and *nix and OS X, although testing hasn't been extensive. Usage ------ ``` >>> import facter >>> f = facter.Facter() >>> f["architecture"] 'x86_64' >>> f.lookup("uptime_seconds") 195106 >>> f.lookup("uptime_seconds") 195106 >>> f.lookup("uptime_seconds", cache=False) 195234 >>> f = facter.Facter(use_yaml=False) >>> f.lookup("uptime_seconds") '195301' >>> f.get("not a fact", "mere opinion") 'mere opinion' ``` More methods exist. Documentation to come. Install --------- ``` pip install facter ``` or ``` pip install facter[yaml] ``` to include pyYAML Requirements ------------- Required: - facter - must be installed through system packages or Ruby Gems - [six](https://pypi.python.org/pypi/six/) - Python 2 and 3 compatibility (marked in setup.py) Optional: - [pyYAML](http://pyyaml.org/wiki/PyYAML) - For YAML parsing of results Project State -------------- This is an alpha/early version and it hasn't been tested much. Please report any issues observed.


نحوه نصب


نصب پکیج whl facterpy-0.1:

    pip install facterpy-0.1.whl


نصب پکیج tar.gz facterpy-0.1:

    pip install facterpy-0.1.tar.gz