Skip to main content

Python Chained Generators for Network Packets: Read the Docs

travis Coverage Status landscape version downloads

wheel supported-versions supported-implementations gitter

Installation

pip install py-chains

Documentation

chains.readthedocs.org

About

The Chains project is an exploration of python components that you ‘chain’ together to process streaming network packets. The use of native python generators means the code is extremely lightweight and efficient.

Example

# Create the classes
streamer = packet_streamer.PacketStreamer(iface_name=data_path, max_packets=10)
meta = packet_meta.PacketMeta()
rdns = reverse_dns.ReverseDNS()
printer = packet_printer.PacketPrinter()

# Set up the chain
meta.link(streamer)
rdns.link(meta)
printer.link(rdns)

# Pull the chain
printer.pull()

Example Output

Timestamp: 2015-05-27 01:17:07.919743
Ethernet Frame: 6c:40:08:89:fc:08 --> 01:00:5e:00:00:fb  (type: 2048)
Packet: IP 192.168.1.9 --> 224.0.0.251 (len:55 ttl:255) -- Frag(df:0 mf:0 offset:0)
Domains: LOCAL --> multicast_dns
Transport: UDP {'dport': 5353, 'sum': 59346, 'sport': 5353, 'data': '...', 'ulen': 35}
Application: None

Timestamp: 2015-05-27 01:17:07.919926
Ethernet Frame: 6c:40:08:89:fc:08 --> 33:33:00:00:00:fb  (type: 34525)
Packet: IP6 fe80::6e40:8ff:fe89:fc08 --> ff02::fb (len:35 ttl:255)
Domains: LOCAL --> multicast_dns
Transport: UDP {'dport': 5353, 'sum': 6703, 'sport': 5353, 'data': '...', 'ulen': 35}
Application: None
...

LICENSE

MIT Licensed

Release files for py-chains 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for py-chains 0.1.8
File Size Uploaded
py-chains-0.1.8.tar.gz 30.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-chains 0.1.8
File Interpreter ABI Platform
py_chains-0.1.8-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 51.8 kB

Release files / py-chains-0.1.8.tar.gz

Download URL py-chains-0.1.8.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
506a06ce605d5126ae6d2c6eb6585d09783f0a5c7e6045cc53913dde04d4c8a8
BLAKE2b-256 checksum
How to use checksums
7ae0ca90f788bd97b6375a2fcab0093c1ba8f32cf85901073880363ed59866ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / py_chains-0.1.8-py2.py3-none-any.whl

Download URL py_chains-0.1.8-py2.py3-none-any.whl
Size 21.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e33b836c87daa4193b063427268d2ddf3a6a8098a511ee5c808bb8bab48cbf69
BLAKE2b-256 checksum
How to use checksums
f450401a004e1d76816fc5d8139a96baf6bcb95ef5b0643399d1250e82cd4b2c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page