Maltego Transform development framework with async support and standalone Transform server
Project description
maltego-transforms
The Python SDK for building Maltego transform servers.
A transform takes one or more Maltego entities as input — an IP address, a domain, a person, a document, or your own custom object — and returns related entities as output. Transforms are how Maltego expands a graph, and maltego-transforms is the fastest way to write and run your own.
Install
pip install maltego-transforms
Requires Python >=3.10,<3.15.
Your first transform
from maltego.server import (
MaltegoContext,
MaltegoEntity,
MaltegoServerSettings,
register_transform,
run_server,
setup,
)
@register_transform(
display_name="Hello World [My Transforms]",
transform_set="My Transforms",
)
async def hello_world(
input_entity: MaltegoEntity,
context: MaltegoContext,
) -> MaltegoEntity:
context.log.inform(f"Hello from {context.remote_ip}")
return MaltegoEntity["maltego.Phrase"](f"Hello, {input_entity.value}") # type: ignore
if __name__ == "__main__":
settings = MaltegoServerSettings(
server_name="My Transform Server",
ns="my.transforms",
author="i@example.com",
)
setup(settings)
run_server(settings=settings, ssl=False) # plain HTTP for local development
Save this as project.py and run it:
python project.py
This starts a local HTTP server on 127.0.0.1:3000, serving a seed URL at /seed. Add that URL to Maltego to discover and install your transforms. SSL is on by default for anything beyond local dev — see HTTPS, Certificates, and Browser Trust, which the Graph Browser client requires.
Prefer a ready-made project over a blank file?
maltego-transforms start my_project
cd my_project
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
python project.py
This scaffolds a runnable project with example transforms covering the most common patterns.
Runbooks
Repository runbooks live in runbooks/ and capture repeatable
workflows for contributors and coding agents, including writing PRPs for
non-trivial changes and choosing the right test command.
Features
- Decorator-based registration —
@register_transformturns any function into a discoverable transform - Typed input and output — plain Python type hints; the SDK infers and validates entity types for you
- Async and streaming — write
async deftransforms, or useAsyncGeneratorto stream results as they're found - OAuth — built-in support for OAuth-authenticated transforms
- Transform settings — expose configurable options (API keys, limits, toggles) that users fill in from the Maltego client
- Input constraints — control which entities a transform is even offered for, before it runs
- Middlewares — hook into the request/response lifecycle for logging, auth, or shared setup
Standard entities
Want typed entity classes instead of raw dictionaries? maltego-transforms-std-entities ships ready-made classes like Person, DNSName, and IPv4Address:
pip install maltego-transforms-std-entities
from maltego.entities import DNSName, IPv4Address
from maltego.server import register_transform
@register_transform
async def dns_to_ip(input_entity: DNSName) -> IPv4Address:
return IPv4Address("1.1.1.1")
Building with an AI coding agent
Scaffold a project with agent skills for authoring and testing transforms:
maltego-transforms start my-project --with-skills
This drops a skill index into .agents/skills/ that points your coding agent at the right focused skill for the task at hand — building a new transform, migrating an existing one, or debugging discovery. See Using AI Agent Skills with the SDK for details.
Documentation
Full docs — configuration, authentication, entity modeling, pagination, and the complete API reference — start at the Maltego Transforms SDK overview.
Support
Questions or issues? Reach out through the Maltego Support Portal or your Maltego account contact.
Contributing
Contributions are welcome — see CONTRIBUTING.md for guidelines.
License
maltego-transforms is licensed under the MIT License.
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 maltego_transforms-1.0.0.tar.gz.
File metadata
- Download URL: maltego_transforms-1.0.0.tar.gz
- Upload date:
- Size: 247.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 |
02df34c27ee54c7a3761165bbee58f02ec9e45e12cc6fe147bcd85bb795ec7d2
|
|
| MD5 |
322184e5be5501a0b16c3b532131158d
|
|
| BLAKE2b-256 |
ed9afefeb1eea89dc064d3c501cbc0b6b3314216068cc5710cd0c84da350f1fa
|
Provenance
The following attestation bundles were made for maltego_transforms-1.0.0.tar.gz:
Publisher:
release.yml on MaltegoTech/maltego-transforms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maltego_transforms-1.0.0.tar.gz -
Subject digest:
02df34c27ee54c7a3761165bbee58f02ec9e45e12cc6fe147bcd85bb795ec7d2 - Sigstore transparency entry: 2163097037
- Sigstore integration time:
-
Permalink:
MaltegoTech/maltego-transforms@b97a484998bc2a04e7f49e5ffda20d96ce88b04b -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/MaltegoTech
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b97a484998bc2a04e7f49e5ffda20d96ce88b04b -
Trigger Event:
release
-
Statement type:
File details
Details for the file maltego_transforms-1.0.0-py3-none-any.whl.
File metadata
- Download URL: maltego_transforms-1.0.0-py3-none-any.whl
- Upload date:
- Size: 318.6 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 |
3b9371bb0332d28d85b81f76b1c6abc2221356ec3493d534d81d2ac8cb495a2d
|
|
| MD5 |
515eebeb6371b70d88a6d2db71a478dc
|
|
| BLAKE2b-256 |
c58ba53efc5051243206c6536028fb80824732dc612b9f49b98c54de7eff3889
|
Provenance
The following attestation bundles were made for maltego_transforms-1.0.0-py3-none-any.whl:
Publisher:
release.yml on MaltegoTech/maltego-transforms
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
maltego_transforms-1.0.0-py3-none-any.whl -
Subject digest:
3b9371bb0332d28d85b81f76b1c6abc2221356ec3493d534d81d2ac8cb495a2d - Sigstore transparency entry: 2163097060
- Sigstore integration time:
-
Permalink:
MaltegoTech/maltego-transforms@b97a484998bc2a04e7f49e5ffda20d96ce88b04b -
Branch / Tag:
refs/tags/1.0.0 - Owner: https://github.com/MaltegoTech
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b97a484998bc2a04e7f49e5ffda20d96ce88b04b -
Trigger Event:
release
-
Statement type: