Skip to content
Snippets Groups Projects
Commit 38d02162 authored by Pavel Kácha's avatar Pavel Kácha
Browse files

Remove inline docstring example (makes more sense within main manual document)

parent 7f62345d
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
""" """ DeadBeat - Framework for event driven data transformation scripts. """
DeadBeat
========
Framework for event driven data transformation scripts.
Example usage
-------------
::
import sys
import sys
from deadbeat import movement, log, conf, dns, text, fs
name = "IP_Resolve"
description = "Proof-of-concept bulk IP resolver"
conf_def = conf.cfg_root((
conf.cfg_item(
"input_files", conf.cast_path_list, "Input log files", default="test-input.txt"),
conf.cfg_item(
"output_file", str, "Output file", default="test-output.txt"),
conf.cfg_section("log", log.log_base_config, "Logging"),
conf.cfg_section("config", conf.cfg_base_config, "Configuration")
))
def main():
cfg = conf.gather(typedef=conf_def, name=name, description=description)
log.configure(**cfg.log)
train = movement.Train()
file_watcher = fs.FileWatcherSupply(train.esc, filenames=cfg.input_files, tail=True)
csv_parse = text.CSVParse(fieldnames=("ip",))
resolve = dns.IPtoPTR(train.esc)
serialise = text.CSVMarshall(fieldnames=("ip", "hostnames"))
output = fs.LineFileDrain(train=train, path=cfg.output_file, timestamp=False, flush=False)
train.update(movement.train_line(file_watcher, csv_parse, resolve, serialise, output))
train()
if __name__ == '__main__':
sys.exit(main())
"""
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment