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, you can install sysfacts for your user with:

pipx install sysfacts

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

In case you need to run sysfacts just once, without installing it, you can do it with

pipx run sysfacts

This way, pipx will create a temporary virtual environment, install sysfacts, run it and cleanup afterwards.

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 --no-color
# YAML output
sysfacts --yaml
sysfacts --yaml --no-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.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

sysfacts-0.2.0-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sysfacts-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 fe954077c219f132828df4cb1b5f8d46529471f0111b86dac2cd91e21bdf6f59
MD5 a87c4bffe0737aaf0c21f389c4995e91
BLAKE2b-256 2093eda8ebe31d40eaeaa742d18b951bf6b33a0c72d6b01a5a1a215c29cbd3e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sysfacts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b51fbd1733e992c87aeeb4cf97ea8f9b414d73708dbca948214b9841786b190
MD5 db211be36d53ed5512e67be3ec726143
BLAKE2b-256 fe6654ec4c6d0abd22e178479fe18d093387bf7be70fc25df7e8125a452131bb

See more details on using hashes here.

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