$npx skillfedfor your agent

cogapp

Cog: A content generator for executing Python snippets in source files.

Worth itPyPI Code GeneratorsReleased Sep 2025253.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cogapp-3.6.0-py3-none-any.whl
v3.6.0 · released 2025-09-21 · Python >=3.9

Yes. Cog is lightweight, actively maintained, has no dependencies, and solves a specific problem well: keeping computed content in sync with its source code. Install it if you need to embed executable Python in static files and regenerate their output on demand. The MIT license and broad Python version support make it low-risk.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Active maintenance with recent commits and stable production status across Python 3.9–3.14.

License · maintenance · safety

MIT (permissive) — MIT license permits commercial and private use with minimal restrictions; attribution required.

last release 2025-09-21 (327 days) · last repo commit 2026-08-05 · 408 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 253,549 downloads/mo, #8,516 on PyPI

Verify before relying

pip install cogapp

In a source file, mark a code block with special delimiters, then run cogapp to execute the embedded code and replace the marked section with its output.
  • Whether the package handles complex nested code generation or only simple linear snippets.
  • Performance characteristics on large files or many embedded snippets.
  • Integration patterns with common static site generators (Hugo, Jekyll, Sphinx).
  • Exact syntax and delimiter format for marking code blocks in different file types.
Same gist for agents: .md · .json

What it is and what it does

Cog is a content generator that finds Python code blocks marked in source files, executes them, and replaces the marked regions with their output. It's designed for static files—documentation, HTML, configuration, or any text format—where you want computed or templated content without a full build system. The tool reads the source, runs the embedded Python, and writes the result back in place.

It has no external runtime dependencies and runs on Python 3.9 and later. The workflow is straightforward: mark a code block with special comments, run the tool on the file, and the output replaces the marked section. This is useful for keeping generated content (like tables, API docs, or configuration examples) in sync with the code that produces them, without requiring a separate templating language or build step.

Use it for

  • Keep API documentation examples in sync by embedding Python code that generates them.
  • Generate configuration file snippets or boilerplate from Python logic.
  • Maintain data tables or reference lists in markdown by computing them from live data.
  • Embed test output or validation results directly into README or guide files.
  • Generate HTML or XML fragments from Python without a full template engine.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Cog is lightweight, actively maintained, has no dependencies, and solves a specific problem well: keeping computed content in sync with its source code. Install it if you need to embed executable Python in static files and regenerate their output on demand. The MIT license and broad Python version support make it low-risk.

Install

cogapp on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Active maintenance with recent commits and stable production status across Python 3.9–3.14.

Requires Python 3.9 or later.

License in practice

MIT license permits commercial and private use with minimal restrictions; attribution required.

Quickstart

pip install cogapp

In a source file, mark a code block with special delimiters, then run cogapp to execute the embedded code and replace the marked section with its output.

Verify before relying

  • Whether the package handles complex nested code generation or only simple linear snippets.
  • Performance characteristics on large files or many embedded snippets.
  • Integration patterns with common static site generators (Hugo, Jekyll, Sphinx).
  • Exact syntax and delimiter format for marking code blocks in different file types.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 327 days since the last release
Last repo commit
First released
Downloads253,549 / month, #8,516 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9Topic :: Software Development :: Code Generators

Evidence: cogapp-3.6.0-py3-none-any.whl

Tags

Capabilities
code generation from python snippetsdynamic content in static filesembedded python executiontemplate-like code generationsource file content generationpython snippet processorstatic file templating
Topics
code-generationstatic-site-toolsdocumentation

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “code generation from python snippets”

  • cogappCog executes Python code snippets embedded in source files and…
  • PyLaTeXPyLaTeX generates LaTeX documents and code snippets from Python,…
  • streamlit-embedcodeEmbeds code snippets from external services (GitHub gist, GitLab,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Code Generators packages

proto-plus Worth it
PyPI · Python Modules · released Aug 2026

Proto Plus wraps protocol buffers to provide Python classes that behave like native Python types while maintaining protocol buffer serialization and schema validation.

Install it if you're working with protocol buffers in Python and want a more Pythonic interface, or if you're using Google Cloud libraries that depend on it.

Apache-2.0pure Python · 3.10+
343.8Mdownloads / mo
Cython Worth it
PyPI · Python Modules · released Jul 2026

Cython is a source code translator that compiles Python code to C, enabling optional static typing and direct C/C++ interoperability to generate efficient native extensions.

Install it if you need to optimize Python performance, wrap C/C++ libraries, or build fast native extensions.

permissive licensepure Python · 3.8+
136.1Mdownloads / mo
asttokens Worth it
PyPI · Python Modules · released Jul 2026

Annotates Python abstract syntax trees with the positions of tokens and source code text, enabling tools to map AST nodes back to their originating code for refactoring, analysis, and transformation.

permissive licensepure Python · 3.8+
134.8Mdownloads / mo
beartype Worth it
PyPI · Python Modules · released Dec 2025

Beartype is a runtime type checker that validates Python type hints at function call time, catching type violations before they cause downstream bugs.

Install it if you want runtime type safety for your annotated code or need to validate type hints on third-party packages.

MITpure Python · 3.10+
99.1Mdownloads / mo
llvmlite With conditions
PyPI · Code Generators · released Aug 2026

llvmlite provides a lightweight Python binding to LLVM's IR builder, optimizer, and JIT compiler APIs, enabling you to write JIT compilers and code generators without needing the full LLVM C++ API surface.

BSD-2-Clause AND Apache-2.0 WITH LLVM-exceptioncompiled wheel · 3.10+
69.3Mdownloads / mo
astor Worth it
PyPI · Code Generators · released Dec 2019

astor converts Python abstract syntax trees (ASTs) back to readable source code and provides tools for AST manipulation, inspection, and non-recursive tree traversal.

Install it if you need AST round-tripping or advanced tree inspection.

BSD-3-Clausepure Python
20.0Mdownloads / mo

See also markdown-exec · cog · ct3 · Cheetah3 · streamlit-embedcode · rio-cogeo · coverage · PyLaTeX · html5tagger · sybil