معرفی شرکت ها


facts-0.4


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

Return facts of server
ویژگی مقدار
سیستم عامل -
نام فایل facts-0.4
نام facts
نسخه کتابخانه 0.4
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Xavier Barbosa
ایمیل نویسنده clint.northwood@gmail.com
آدرس صفحه اصلی https://github.com/johnnoone/facts
آدرس اینترنتی https://pypi.org/project/facts/
مجوز UNKNOWN
Facts ===== Returns facts of local machine. Installation ------------ :: pip install facts CLI Usage --------- Get all facts:: facts all Get one fact:: fact read foo Get the human readable memory usage:: fact read memory --human Set one custom fact:: fact write foo 'It is nice' When value is a mapping, then you can choose between 2 merging strategies:: fact write foo '{is: bar}' --format yaml --replace fact write foo '{not: baz}' --format yaml --merge Delete a custom fact:: fact delete foo Targeting --------- By convention key facts can't have colon marks. Because facts can be nested, and it's possible to target these sub data. Each parts must be seperated by a colon. For example if:: fact read foo returns:: is: bar not: baz Then:: fact read foo:is returns:: bar But:: fact read foo:wrong:key will return nothing. Matching -------- It is also possible to check if a certain fact turns out true:: fact match foo:is:bar Grafting -------- Facts allow you to extends with 'grafts'. There is 2 ways 1. by modules ~~~~~~~~~~~~~ You can extend with your own facts. Any python modules under ``~/.facts/grafts`` will be loaded. For example:: # ~/.facts/grafts/my_grafts.py from facts import graft, mark @graft def hello_world(): return { 'hello': 'world', 'size': mark(1234567890, 'bytes') } Will append the fact ``hello`` with the value ``world``, and the fact ``size`` with one of these values (depending the --human switch) ``1234567890`` or ``1.1G``. 2. with setuptools ~~~~~~~~~~~~~~~~~~ You also write python libraries that will contribute to facts with using setuptools. Add the following to the setup.py function:: entry_points={ 'facts.graft': [ 'plugin-1 = mylib:plugin_1', 'plugin-2 = mylib:plugin_2' ] }


نحوه نصب


نصب پکیج whl facts-0.4:

    pip install facts-0.4.whl


نصب پکیج tar.gz facts-0.4:

    pip install facts-0.4.tar.gz