PyTAK is a Python package for rapid TAK integration.
Project description
Python Team Awareness Kit (PyTAK)
PyTAK is a Python library for building TAK clients, servers & gateways — things that send and receive Cursor on Target (CoT) data on TAK networks.
Install
python3 -m pip install pytak
Quick example
import asyncio, xml.etree.ElementTree as ET
from configparser import ConfigParser
import pytak
class MySender(pytak.QueueWorker):
async def handle_data(self, data):
await self.put_queue(data)
async def run(self):
while True:
root = ET.Element("event", version="2.0", type="t-x-d-d",
uid="myMarker", how="m-g",
time=pytak.cot_time(), start=pytak.cot_time(),
stale=pytak.cot_time(3600))
await self.handle_data(ET.tostring(root))
await asyncio.sleep(20)
async def main():
config = ConfigParser()
config["mytool"] = {"COT_URL": "tcp://takserver.example.com:8087"}
config = config["mytool"]
clitool = pytak.CLITool(config)
await clitool.setup()
clitool.add_tasks(set([MySender(clitool.tx_queue, config)]))
await clitool.run()
asyncio.run(main())
Features
- TAK Protocol support — XML (TAK Protocol v0) and Protobuf (TAK Protocol v1, via
takproto) - Multiple transports — TCP, TLS, UDP unicast, UDP multicast (Mesh SA), UDP broadcast, file, stdout
- TLS client auth — PEM certs, PKCS#12 (
.p12), password-protected keys - TAK enrollment — automatic certificate enrollment from a
tak://onboarding URL - Marti REST API — send/receive CoT via TAK Server's HTTP API (
marti://URL scheme) - TAK Data Packages — import
.zippref packages containing server connection settings and certs - FreeTAKServer compat — built-in rate-limiting mode (
FTS_COMPAT) - No required external deps — pure-Python asyncio core; optional extras for TLS enrollment and Protobuf
Documentation
Full documentation at pytak.rtfd.io including installation, configuration, examples, and troubleshooting.
License & Copyright
Copyright Sensors & Signals LLC https://www.snstac.com
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
asyncio_dgram is Copyright (c) 2019 Justin Bronder and is licensed under the MIT License, see pytak/asyncio_dgram/LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytak-7.3.7.tar.gz.
File metadata
- Download URL: pytak-7.3.7.tar.gz
- Upload date:
- Size: 67.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d92be449b6c5c4abf18754c1fa056216fce0ea0ac58b9fd8e0c5247fe50d5873
|
|
| MD5 |
acb5fdfaa34e1e391d6c2b4db12ec88c
|
|
| BLAKE2b-256 |
4974a726506100c4a948349496071c6132f0fbbd4e154be3eeb88975df4c8106
|
Provenance
The following attestation bundles were made for pytak-7.3.7.tar.gz:
Publisher:
ci.yml on snstac/pytak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytak-7.3.7.tar.gz -
Subject digest:
d92be449b6c5c4abf18754c1fa056216fce0ea0ac58b9fd8e0c5247fe50d5873 - Sigstore transparency entry: 1463112102
- Sigstore integration time:
-
Permalink:
snstac/pytak@926248da72e29df76478389064f1d7dc085972db -
Branch / Tag:
refs/tags/v7.3.7 - Owner: https://github.com/snstac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@926248da72e29df76478389064f1d7dc085972db -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytak-7.3.7-py3-none-any.whl.
File metadata
- Download URL: pytak-7.3.7-py3-none-any.whl
- Upload date:
- Size: 51.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a98f4de8cfdd0f343f5cf3291d1187ea3b7a494f50748fb1855c6899b8c59c11
|
|
| MD5 |
7c9c0cbab198d9806eb20322dcc3bb43
|
|
| BLAKE2b-256 |
5501562490cd17c3671e240a2d024994f70dd41485edf47db06c4df6b061196b
|
Provenance
The following attestation bundles were made for pytak-7.3.7-py3-none-any.whl:
Publisher:
ci.yml on snstac/pytak
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytak-7.3.7-py3-none-any.whl -
Subject digest:
a98f4de8cfdd0f343f5cf3291d1187ea3b7a494f50748fb1855c6899b8c59c11 - Sigstore transparency entry: 1463112113
- Sigstore integration time:
-
Permalink:
snstac/pytak@926248da72e29df76478389064f1d7dc085972db -
Branch / Tag:
refs/tags/v7.3.7 - Owner: https://github.com/snstac
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@926248da72e29df76478389064f1d7dc085972db -
Trigger Event:
push
-
Statement type: