pycti
Python API client for OpenCTI.
What it is and what it does
Pycti is the official Python client for OpenCTI, a threat intelligence platform developed by Filigran. It abstracts the OpenCTI REST API into Python methods and utilities, allowing developers to query, create, and manage threat intelligence objects (indicators, malware, campaigns, etc.) programmatically. The client is used both by external integrations and by OpenCTI's own internal components.
The package brings together a substantial dependency graph—including boto3 for cloud storage, pika for message queuing, fastapi and uvicorn for async web operations, stix2 for standards-based threat data, and observability tools like prometheus-client and opentelemetry—suggesting it is designed for production environments where threat data flows through multiple systems. It requires Python 3.7 or later and is actively maintained, with its last release 3 days old.
Use it for:
- Automate threat intelligence ingestion by querying OpenCTI for indicators, malware profiles, or campaigns and feeding them into your security tools.
- Build custom connectors or enrichment workflows that read from OpenCTI and write results back, leveraging the client's standardized API methods.
- Integrate OpenCTI threat data into SOAR platforms or incident response systems via programmatic API calls rather than manual exports.
- Develop monitoring dashboards or reporting scripts that pull live threat statistics and entity relationships from an OpenCTI instance.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a Python client library for the OpenCTI API, enabling developers to programmatically interact with OpenCTI threat intelligence platform instances through standardized methods and utilities.
Yes. The package is actively maintained, permissively licensed, has no known vulnerabilities, and is widely used (top 5000 PyPI). Install it if you need to integrate with OpenCTI; the main consideration is ensuring your OpenCTI instance is accessible and that the 18 runtime dependencies align with your environment's constraints.
Install
pycti on PyPI
pip
pip install pyctiuv
uv add pyctipoetry
poetry add pyctiInstalling pycti
Before you install
Low friction installation with a pure-Python wheel distribution. The package is actively maintained with a recent release and 9810 repository stars, indicating stable community adoption.
License in practice
Licensed under Apache (permissive), allowing commercial and private use with minimal restrictions—suitable for most deployment scenarios.
Quickstart
pip install pycti
from pycti import OpenCTIApiClient
client = OpenCTIApiClient(
url="http://opencti-instance:4000",
token="your-api-token"
)
# Query indicators
indicators = client.indicator.list()
An accessible OpenCTI API instance (URL and valid authentication token) is required; the client cannot function without a running OpenCTI server to connect to.
Verify before relying
- Whether the package's 18 runtime dependencies (including boto3, fastapi, stix2) are all required for basic usage or if some are optional for specific features.
- Whether OpenCTI API server availability is a hard requirement or if the client can operate in offline/mock modes for testing.
Package facts
| License | Apache (permissive) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 18 — boto3, datefinder, pika, pydantic, python_json_logger, PyYAML, requests, setuptools, cachetools, prometheus-client, opentelemetry-api, opentelemetry-sdk, deprecation, fastapi, uvicorn, pyjwt, filigran-sseclient, stix2 |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,917,186/month — #3,433 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pycti-7.260811.0-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
taxii2-clientA minimal client library for querying and…
permissive · top 15,000 on PyPI
stix2Serializes and deserializes STIX 2 JSON…
permissive · top 5,000 on PyPI
OTXv2OTXv2 is a Python client for AlienVault's Open…
unclear · top 15,000 on PyPI
vt-pyOfficial Python client for the VirusTotal REST…
permissive · top 15,000 on PyPI
kubernetesProvides a Python interface to the Kubernetes…
permissive · top 1,000 on PyPI
stixParses, manipulates, and generates STIX v1.2.0…
permissive · top 15,000 on PyPI
mixboxMixbox provides shared utility code for…
permissive · top 15,000 on PyPI
docker-pyA Python client library that lets you control…
permissive · top 5,000 on PyPI
boschshcpyPython client library for the Bosch Smart Home…
permissive · top 15,000 on PyPI
alibabacloud-sas20181203Provides Python bindings to Alibaba Cloud's…
permissive · top 15,000 on PyPI