pypylon AGENTS.md

Repository instructions for pypylon, the official Python wrapper around Basler's pylon camera software. They map the source bindings, generated Python modules, camera examples, tests, and build scripts.

In plain words
What is it for?
Use them when changing camera bindings, rebuilding generated code, adding samples, updating tests, or working with USB and network-connected camera support.
Why use it?
They show which files are generated and which are edited by hand, reducing the risk of losing changes or placing code in the wrong part of the wrapper.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/basler/pypylon/agents-md
Clone the repo
git clone --depth 1 https://github.com/basler/pypylon

Made for: Codex, OpenCode.

Per session 1,195 This file is loaded in full into every session.
When invoked 1,195 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01195 $0.01195
Opus 5 $0.00598 $0.00598
Sonnet 5 $0.00239 $0.00239
Haiku 4.5 $0.00120 $0.00120

Measured 2d ago against content hash 18d11dee79ef, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pypylon AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 105 lines

How it starts

The opening of the file, as written. The whole thing — 105 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md

Development guide for contributors and automated assistants working in this repository. pypylon is the official Python wrapper for the Basler pylon Camera Software Suite, built with SWIG on top of the pylon C++ SDK. See README.md for the project overview, installation, and quick-start examples.

Repository map

Path Contents
src/ SWIG interface (.i) files — the binding definitions for genicam, pylon, pylondataprocessing.
pypylon/ Generated/packaged Python modules (build output; not edited by hand).
generated/ SWIG-generated C++/Python (build output).
samples/ Example scripts under pylon/ and pylondataprocessing/ (one folder per sample, <name>/<name>.py); shared helper modules in common/; shared image/data assets in images/. See context/sample_style.md for layout and naming.
samples_reference_pypylon/ Reference ports of the C++ pylon samples.
tests/ Unit tests: genicam/, pylon/{emulated,usb,gigE}/, pylondataprocessing/. Entry point: tests/all_tests.py.
scripts/ Build/format helper scripts.
context/ Coding-style reference docs (see below).
setup.py, pyproject.toml Build configuration.

Environment

Run all project Python commands inside the Python environment where pypylon is built/installed, so they use the correct interpreter and the matching pylon SDK. This file intentionally does not prescribe a specific environment manager (venv, conda, uv, …) — activate whichever one you use before running commands.

Building from source additionally requires an installed pylon SDK, a C++ compiler, Python development headers, and SWIG 4.3 (see README.md).

Common commands

Build and install for local development:

pip install -e .
# or, to (re)build in place after changing bindings:
python setup.py build

Run the tests the way CI does — pytest over the hardware-free (Camera Emulation) suites:

pip install pytest numpy
pytest tests/genicam tests/pylon/emulated tests/pylondataprocessing

Read the full file on GitHub · 105 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 105 lines · 1,195 tokens per session scan A 18d11dee79ef

Subscribe to this mod's changes

pypylon AGENTS.md is an instructions file published in the GitHub repository basler/pypylon (710 stars, last pushed 20d ago), licensed BSD-3-Clause. It adds 1,195 tokens to every session, about $0.0060 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.