Skip to main content

NIXT

Project description

NAME

nixt - NIXT

SYNOPSIS

nixtctl <cmd> [key=val] [key==val]
nixtd
nixts

DESCRIPTION

NIXT has all the python3 code to program a unix cli program, such as disk perisistence for configuration files, event handler to handle the client/server connection, code to introspect modules for commands, deferred exception handling to not crash on an error, a parser to parse commandline options and values, etc.

NIXT uses object programming (OP) that allows for easy json save//load to/from disk of objects. It provides an “clean namespace” Object class that only has dunder methods, so the namespace is not cluttered with method names. This makes storing and reading to/from json possible.

NIXT is Public Domain.

INSTALL

$ pipx install nixt
$ pipx ensurepath

USAGE

without any argument the bot does nothing

$ nixtctl
$

see list of commands

$ nixtctl cmd
cmd,err,mod,thr,upt

start daemon

$ nixtd
$

start service

$ nixts
<runs until ctrl-c>

COMMANDS

cmd - commands
err - show errors
mod - modules
thr - show running threads
upt - show uptime

CODE

>>> from nixt.object import Object, dumps, loads
>>> o = Object()
>>> o.a = "b"
>>> print(loads(dumps(o)))
{'a': 'b'}

SYSTEMD

$ nixtctl srv > nixt.service
$ sudo mv *.service /etc/systemd/system/
$ sudo systemctl enable nixt --now

FILES

~/.nixt
~/.local/bin/nixt
~/.local/bin/nixtctl
~/.local/bin/nixtd
~/.local/bin/nixts
~/.local/pipx/venvs/nixt/*

AUTHOR

Bart Thate <bthate@dds.nl>

COPYRIGHT

NIXT is Public Domain.

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

nixt-140.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file nixt-140.tar.gz.

File metadata

  • Download URL: nixt-140.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for nixt-140.tar.gz
Algorithm Hash digest
SHA256 e7b217278858220c7e66979d88b5a011e7be4198ce6b82b95bac92d48a1be1ac
MD5 850933f4627743ca8e2af085ff90f9db
BLAKE2b-256 040e2de43ea86d1701c7e727d76ccdd28765e19fa8259789300e845b27cded66

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