astatine
Some handy helper functions for Python's AST module.
What it is and what it does
Astatine is a utility library that wraps Python's built-in ast module with helper functions to work around version inconsistencies. The ast module itself has changed between Python releases, making it difficult to write code that works reliably across versions; astatine abstracts those differences away. It depends on asttokens and domdf-python-tools to provide its functionality.
The package is in Beta status and actively maintained. It supports Python 3.6 through 3.11 on both CPython and PyPy, and is distributed as a pure Python wheel with no compiled dependencies. It's typed (includes type hints) and has no known security vulnerabilities.
Use it for:
- Normalize AST handling across different Python versions in a code analysis or transformation tool
- Build linters or code quality checkers that need consistent AST access across Python 3.6–3.11
- Simplify AST-based code generation or refactoring scripts by using stable helper functions
- Develop Python parsing libraries that need to support multiple Python versions without version-specific branching
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Astatine provides helper functions and utilities for working with Python's AST (Abstract Syntax Tree) module, abstracting away version inconsistencies across Python releases.
Yes, if you're writing tools that parse or manipulate Python code and need to support multiple Python versions. The low install friction, permissive license, active maintenance, and zero known vulnerabilities make it a safe choice. Not worth installing if you only target a single Python version or don't work with the ast module.
Install
astatine on PyPI
pip
pip install astatineuv
uv add astatinepoetry
poetry add astatineInstalling astatine
Before you install
Low friction: pure Python wheel with only two runtime dependencies (asttokens and domdf-python-tools). Actively maintained as of 2026-04-07, though last release was 2023-08-15.
License in practice
MIT license (permissive) means you can use, modify, and distribute astatine freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install astatine
import astatine
# Use astatine's helper functions for AST manipulation
# (specific functions depend on the version's API)
Requires Python 3.6 or later; the package is designed to smooth over AST differences across supported Python versions.
Verify before relying
- What specific AST helper functions are provided and their typical use patterns
- How the package handles AST differences between Python 3.6 and 3.11
- Performance characteristics when processing large syntax trees
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — asttokens, domdf-python-tools |
| Maintenance | actively maintained — 1,095 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 104,665/month — #12,740 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: astatine-0.3.3-py3-none-any.whl
Keywords: ast
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
ast-commentsExtends Python's built-in `ast` module to…
permissive · top 15,000 on PyPI
astroidAstroid builds an extended abstract syntax tree…
copyleft · top 1,000 on PyPI
typed-astProvides Python 2.7 and Python 3 AST parsers…
permissive · top 5,000 on PyPI
ast-grep-cliast-grep-cli is a command-line tool for…
permissive · top 5,000 on PyPI
domdf-python-toolsA collection of utility functions and helpers…
permissive · top 5,000 on PyPI
enum-toolsProvides utilities to enhance Python's enum…
copyleft · top 5,000 on PyPI
ast-decompilerConverts Python abstract syntax trees (ASTs)…
permissive · top 15,000 on PyPI
openqasm3Provides a reference abstract syntax tree (AST)…
permissive · top 15,000 on PyPI
gastProvides a unified Abstract Syntax Tree…
permissive · top 5,000 on PyPI
asttokensAnnotates Python abstract syntax trees with the…
permissive · top 1,000 on PyPI