pytak - Python Team Awareness Kit (PyTAK) Module.
PyTAK is a Python Module for creating TAK clients & servers.
This module include Classes for handling CoT Events & non-CoT Messages, as well as functions for serializing CoT Events.
Usage
The following Python 3.7 code example creates a Cursor on Target Client that gets events from a CoT Event Queue and transmits them to our destination URL using TCP. Events are put onto the Queue by the Message Worker (QED). Events are expected to be serialized using the  Module:
#!/usr/bin/env python3.7
import asyncio
import urllib
import pytak
loop = asyncio.get_running_loop()
tx_queue: asyncio.Queue = asyncio.Queue()
rx_queue: asyncio.Queue = asyncio.Queue()
cot_url: urllib.parse.ParseResult = urllib.parse.urlparse('tcp:fts.example.com:8087')
# Create our CoT Event Queue Worker
reader, writer = await pytak.protocol_factory(cot_url)
write_worker = pytak.EventTransmitter(tx_queue, writer)
read_worker = pytak.EventReceiver(rx_queue, reader)
message_worker = MyMessageWorker(
event_queue=tx_queue,
cot_stale=opts.cot_stale
)
done, pending = await asyncio.wait(
set([message_worker.run(), read_worker.run(), write_worker.run()]),
return_when=asyncio.FIRST_COMPLETED)
for task in done:
print(f"Task completed: {task}")
Requirements
PyTAK requires the FFI Library libffi (or libffi-dev), to install follow these instructions.
Debian & Ubuntu:
$ sudo apt-get install libffi-dev
RedHat, Fedora, CentOS:
$ sudo yum install libffi-devel # or $ sudo dnf install libffi-devel
Installation
Option A) Install from the Python Package Index:
$ pip install pytak
Option B) Install from this source tree:
$ git clone https://github.com/ampledata/pytak.git $ cd pytak/ $ python setup.py install
Build Status
Source
Copyright
Copyright 2020 Orion Labs, Inc.
License
Apache License, Version 2.0. See LICENSE for details.
Metadata
Release files for pytak 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pytak-3.0.0.tar.gz | 6.3 kB | Without provenance | Details |
Release files / pytak-3.0.0.tar.gz
| Download URL | pytak-3.0.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9158ba3e9cca390dd1be0185c62773bab370cfcc69bf4a9b2cbf2fa75b4ef21c
|
|
BLAKE2b-256 checksum How to use checksums |
ff96e1fdd622a45234236d48e8c160d3b1ad67bb6f3ae59db5a4aebe1bfdba82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for pytak 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.