semvec/pypi-packages huggingface dataset:
facterpy 0.1
Python library to provide a cached and dictionary-like interface to Puppet's facter utility
License: BSD
Keywords: facter puppet ruby

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.
pjtree 0.1.0
Create files script.
License: BSD

Make any directory and files by json.
Make directory hierarchy to json.


Requirements
------------
* Python 2.7
* Python 3.3


Features
--------
* nonthing


Commands
--------
* jread
* jwrite


Examples
--------
Target directory to json.
::

    $ jread [Target directory] [-f, --file] [--encoding]

Make any directory and files by json.
::

    $ jwrite [Json] [Make path] [--encoding] [--force] [--notoverwrite]

Make any directory and files.


Installation
------------
easy_install:
::

    $ easy_install pjtree

pip:
::

    $ pip install pjtree


License
-------
Copyright (c) 2013, Kazuki Hasegawa All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


History
-------
Version 0.1.0 (9-15-2013)

* Responded to the python3.x


Version 0.0.3 (9-14-2013)

* Added overwrite action


Version 0.0.2 (7-11-2013)

* Responded to the python3.3


Version 0.0.1 (7-9-2013)

* First release