Skip to main content

Collect system information

Project description

sysfacts

Build Status

sysfacts is a system information collector.

It can be used standalone or as a library. In order to achieve its goals, sysfacts tries to leverage existing cross-platform python libraries.

Installation

pipx

The recommended installation method is pipx. More specifically, if you need to run sysfacts just once, you can do it from a temporary virtual environment with:

pipx run sysfacts

If you need to actually install sysfacts for your user you can do it with:

pipx install sysfacts

This command will create a virtual environment in ~/.local/pipx/venvs/sysfacts and add the sysfacts script in ~/.local/bin.

pip

Alternatively you can use good old pip but this is more fragile than pipx.

pip install --user sysfacts

As a dependency for another project

If you use poetry, you can use:

poetry add sysfacts

Usage

Standalone

On standalone mode the output format can be either JSON or YAML. You can also choose between a JSON data blob or colored, pretty-printed output.

sysfacts --help
# JSON output
sysfacts
sysfacts --pretty
sysfacts --pretty --color
# YAML output
sysfacts --yaml
sysfacts --yaml --color

API

The main function is collect_facts() which returns a python dictionary.

from sysfacts import collect_facts

facts = collect_facts()

Alternative projects

Well, this is not really unique, since there are several similar projects out there

  • puppet's facter
  • chef's ohai is written in ruby.
  • datadog's gohai is written in go.
  • if you have ansible installed you can also use ansible local -m setup.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sysfacts-0.1.2.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

sysfacts-0.1.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file sysfacts-0.1.2.tar.gz.

File metadata

  • Download URL: sysfacts-0.1.2.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.2 Linux/4.20.1-arch1-1-ARCH

File hashes

Hashes for sysfacts-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dcddbb583a9824a20ff065f60ebcb566bc460b71eb9add343c7afdaf02b1b03a
MD5 7e1b86df7a705cb8ed6453e7c44de1ff
BLAKE2b-256 028a7cefd58b3fb219c6a3e8458436fb1bc12a0bf36a49a06bbde2865d56b7d1

See more details on using hashes here.

Provenance

File details

Details for the file sysfacts-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sysfacts-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/0.12.10 CPython/3.7.2 Linux/4.20.1-arch1-1-ARCH

File hashes

Hashes for sysfacts-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2673015d11d8fb7bf876663afab3cb2d2312ef53586ffa76f6a96c78a94637f8
MD5 f508389c513d12db6768dbd8809b3ba1
BLAKE2b-256 87c345f36138a2f166b181bc3180c01d53e4a09e12b09ea4b3856769fc3bdefe

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page