Skip to content

Latest commit

 

History

4 提交

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

仓库 files navigation

libspecinfra-python

Description

Python bindings for libspecinfra.

Requirements

Installation

git clone git@github.com:libspecinfra/specinfra.git
git clone git@github.com: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

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

  1. 复刻 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)

关于

Python bindings for libspecinfra

Resources

Stars

7 stars

关注者

1 watching

复刻s

发布

贡献者

Languages