-
Notifications
You must be signed in to change notification settings - Fork 0
Home
sgofferj edited this page Aug 26, 2026
·
7 revisions
Python module for talking to a TAK Server (https://tak.gov) via its REST API.
©2025 Stefan Gofferje | License: GPL-3.0-or-later
The README carries five badges:
| Badge | Meaning |
|---|---|
| CI | Unit-test pipeline status (GitHub Actions, runs on every push/PR) |
| License | GPL-3.0-or-later (full text: LICENSE in the repository) |
| Python | Supported Python versions — 3.11, 3.12 and 3.13 (the CI matrix) |
| Tested on TAK Server | The TAK Server release the live test suite was last verified against |
| API coverage | How many of the target OpenAPI operations are wrapped |
The coverage badge is generated, not hand-written, so it cannot quietly rot:
scripts/generate_coverage_badge.py
parses tests/openapispec.json (the live server's OpenAPI spec), scans the
wrapper sources for the HTTP calls they actually make, and writes the result
to docs/badges/api_coverage.json, which shields.io
renders as a badge.
python scripts/generate_coverage_badge.py
# API coverage: 168 of 182 operations (92.3%) in tags: home-api, ...Notes:
- It counts operations for the API tags this library targets (home, user management, groups, data feeds, submission, subscription, cert manager, mission) — not all 44 tags / 389 operations of the full TAK Server spec.
- Endpoints that are proven broken server-side are deliberately not wrapped and therefore show up as uncovered; see the "Not implemented" sections on the individual API pages.
- Run it after regenerating the spec or wrapping new endpoints, and commit the refreshed JSON together with your change.
Async Python 3 library wrapping the TAK Server HTTP API. All network I/O uses asyncio + aiohttp with certificate-based mutual TLS authentication.
The library is organized into a Server class with sub-api accessors:
-
Home API (
server.home) — administrative status checks -
Mission API (
server.mission) — mission CRUD, subscriptions, roles, content -
User Account Management API (
server.user) — file-based user and group management -
Group API (
server.groups) — channel (group) subscriptions -
Data Feeds API (
server.datafeeds) — predicate feeds, statistics, content -
Cert Manager API (
server.certs) — admin certificate management -
Submission API (
server.submission) — CoT inputs, messaging config -
Subscription API (
server.subscriptions) — client subscriptions, filters
import asyncio
from python_takserver_api import Server
async def main():
srv = Server("takserver.local", "server.pem", "server.key")
if await srv.home.is_admin():
users = await srv.user.get_all_users()
print(users)
await srv.close()
asyncio.run(main())- Getting Started — installation, configuration, basic usage
-
Home API —
server.homemethods -
User Account Management API —
server.usermethods -
Mission API —
server.missionmethods -
Groups API —
server.groupschannel subscriptions -
Data Feeds API —
server.datafeedsmethods -
Cert Manager API —
server.certsmethods -
Submission API —
server.submissionmethods -
Subscription API —
server.subscriptionsmethods