Skip to content

libspecinfra/libspecinfra-python

Repository files navigation

libspecinfra-python

Description

Python bindings for libspecinfra.

Requirements

Installation

git clone [email protected]:libspecinfra/specinfra.git
git clone [email protected]:libspecinfra/libspecinfra-python.git
cd specinfra
cargo build
cp target/debug/libspecinfra.dylib ../libpecinfra-python/
cd ../libpecinfra-python
python setup.py install

※ Installation from PyPI will be supported in the future.

Sample code

import libspecinfra
import libspecinfra.backend

direct = libspecinfra.backend.Direct()
specinfra = libspecinfra.Specinfra(direct)
f = specinfra.file('/etc/passwd')

print(oct(f.mode())) # => 0o644

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

License

MIT License (see LICENSE)

About

Python bindings for libspecinfra

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published