systemd/src/python-systemd
Steven Hiscocks 6a58bf4135 python-systemd: Reader return special fields and _Reader changes
Changes to _Reader make it match closer to C API, by removing `get_next`
and `get_previous`. A `get_all` method added, which returns dictionary
of fields using C API SD_JOURNAL_FOREACH_DATA macro, which can be used
in conjunction with `next`.

_Reader `get`, `next`, `get_{realtime,monotonic,cursor}` and new
`previous` methods are made private. This is so the traversal and
getting of journal fields can be made transparent in the python
interface.

Reader now solely implements `get_next` and `get_previous`, returning a
standard dictionary (future: other mapping types?) with all standard and
special fields through the converters. This makes the output the same as
journalctl json/export format output.

Iterator methods also moved to Reader, as they do not function as intend
with changes to _Reader.

These changes also mean that more optimised journal interfaces can be
made more easily from _Reader, by avoiding getting of unrequired fields
by using the `_get` method, and avoiding field conversions.
2013-04-17 00:09:15 -04:00
..
docs systemd-python: allow retrieval of single fields 2013-03-21 23:05:09 -04:00
__init__.py python: change license to LGPL 2.1 2012-09-13 04:06:11 +02:00
_daemon.c systemd-python: add systemd.daemon wrapping sd-daemon 2013-03-15 22:55:24 -04:00
_journal.c systemd-python: small cleanups 2013-03-19 21:50:43 -04:00
_reader.c python-systemd: Reader return special fields and _Reader changes 2013-04-17 00:09:15 -04:00
.gitignore python: build html docs using sphinx 2013-02-22 16:57:43 +01:00
daemon.py systemd-python: add systemd.daemon wrapping sd-daemon 2013-03-15 22:55:24 -04:00
id128.c Remove some unused variables 2013-03-20 19:16:01 -04:00
journal.py python-systemd: Reader return special fields and _Reader changes 2013-04-17 00:09:15 -04:00
Makefile python: integrate David Strauss' python-systemd package 2012-09-13 04:01:18 +02:00
pyutil.c python-systemd: check all errors and use automatic cleanup 2013-02-28 20:04:17 -05:00
pyutil.h systemd-python: add systemd.daemon wrapping sd-daemon 2013-03-15 22:55:24 -04:00