astroid

A common base representation of python source code for pylint and other projects

Latest version: 4.0.0b2 registry icon
Maintenance score
100
Safety score
100
Popularity score
65
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
4.0.0b2 0 0 0 0 0
4.0.0b1 0 0 0 0 0
4.0.0b0 0 0 0 0 0
4.0.0a0 0 0 0 0 0
3.3.11 0 0 0 0 0
3.3.10 0 0 0 0 0
3.3.9 0 0 0 0 0
3.3.8 0 0 0 0 0
3.3.7 0 0 0 0 0
3.3.6 0 0 0 0 0
3.3.5 0 0 0 0 0
3.3.4 0 0 0 0 0
3.3.3 0 0 0 0 0
3.3.2 0 0 0 0 0
3.3.1 0 0 0 0 0
3.3.0 0 0 0 0 0
3.2.4 0 0 0 0 0
3.2.3 0 0 0 0 0
3.2.2 0 0 0 0 0
3.2.1 0 0 0 0 0
3.2.0 0 0 0 0 0
3.1.0 0 0 0 0 0
3.0.3 0 0 0 0 0
3.0.2 0 0 0 0 0
3.0.1 0 0 0 0 0
3.0.0b0 0 0 0 0 0
3.0.0a9 0 0 0 0 0
3.0.0a8 0 0 0 0 0
3.0.0a7 0 0 0 0 0
3.0.0a6 0 0 0 0 0
3.0.0a5 0 0 0 0 0
3.0.0a4 0 0 0 0 0
3.0.0a3 0 0 0 0 0
3.0.0a2 0 0 0 0 0
3.0.0a1 0 0 0 0 0
3.0.0 0 0 0 0 0
2.15.8 0 0 0 0 0
2.15.7 0 0 0 0 0
2.15.6 0 0 0 0 0
2.15.5 0 0 0 0 0
2.15.4 0 0 0 0 0
2.15.3 0 0 0 0 0
2.15.2 0 0 0 0 0
2.15.1 0 0 0 0 0
2.15.0 0 0 0 0 0
2.14.2 0 0 0 0 0
2.14.1 0 0 0 0 0
2.14.0 0 0 0 0 0
2.13.5 0 0 0 0 0
2.13.4 0 0 0 0 0
2.13.3 0 0 0 0 0
2.13.2 0 0 0 0 0
2.13.1 0 0 0 0 0
2.13.0 0 0 0 0 0
2.12.14 0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 0 0 0
2.2.2 0 0 0 0 0
2.2.1 0 0 0 0 0
2.2.0 0 0 0 0 0
2.1.0 0 0 0 0 0
2.0.4 0 0 0 0 0
2.0.3 0 0 0 0 0
2.0.2 0 0 0 0 0
2.0.1 0 0 0 0 0
2.0 0 0 0 0 0
1.6.6 0 0 0 0 0
1.6.5 0 0 0 0 0
1.6.4 0 0 0 0 0
1.6.3 0 0 0 0 0
1.6.2 0 0 0 0 0
1.6.1 0 0 0 0 0
1.6.0 0 0 0 0 0
1.5.3 0 0 0 0 0
1.5.2 0 0 0 0 0
1.5.1 0 0 0 0 0
1.5.0 0 0 0 0 0
1.4.9 0 0 0 0 0
1.4.8 0 0 0 0 0
1.4.7 0 0 0 0 0
1.4.6 0 0 0 0 0
1.4.5 0 0 0 0 0
1.4.4 0 0 0 0 0
1.4.3 0 0 0 0 0
1.4.2 0 0 0 0 0
1.4.1 0 0 0 0 0
1.4.0 0 0 0 0 0
1.3.8 0 0 0 0 0
1.3.7 0 0 0 0 0
1.3.6 0 0 0 0 0
1.3.5 0 0 0 0 0
1.3.4 0 0 0 0 0
1.3.3 0 0 0 0 0
1.3.2 0 0 0 0 0
1.3.1 0 0 0 0 0
1.3.0 0 0 0 0 0
1.2.1 0 0 0 0 0
1.2.0 0 0 0 0 0
1.1.1 0 0 0 0 0
1.1.0 0 0 0 0 0
1.0.1 0 0 0 0 0
1.0.0 0 0 0 0 0

Stability
Latest release:

4.0.0b2 - This version is safe to use because it has no known security vulnerabilities at this time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

LGPL-2.1-or-later   -   GNU Lesser General Public License v2.1 or later

Not a wildcard

Not proprietary

OSI Compliant



Astroid

.. image:: https://codecov.io/gh/pylint-dev/astroid/branch/main/graph/badge.svg?token=Buxy4WptLb :target: https://codecov.io/gh/pylint-dev/astroid :alt: Coverage badge from codecov

.. image:: https://readthedocs.org/projects/astroid/badge/?version=latest :target: http://astroid.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/ambv/black

.. image:: https://results.pre-commit.ci/badge/github/pylint-dev/astroid/main.svg :target: https://results.pre-commit.ci/latest/github/pylint-dev/astroid/main :alt: pre-commit.ci status

.. |tidelift_logo| image:: https://raw.githubusercontent.com/pylint-dev/astroid/main/doc/media/Tidelift_Logos_RGB_Tidelift_Shorthand_On-White.png :width: 200 :alt: Tidelift

.. list-table:: :widths: 10 100

    • |tidelift_logo|
    • Professional support for astroid is available as part of the Tidelift Subscription_. Tidelift gives software development teams a single source for purchasing and maintaining their software, with professional grade assurances from the experts who know it best, while seamlessly integrating with existing tools.

.. _Tidelift Subscription: https://tidelift.com/subscription/pkg/pypi-astroid?utm_source=pypi-astroid&utm_medium=referral&utm_campaign=readme

What's this?

The aim of this module is to provide a common base representation of python source code. It is currently the library powering pylint's capabilities.

It provides a compatible representation which comes from the _ast module. It rebuilds the tree generated by the builtin _ast module by recursively walking down the AST and building an extended ast. The new node classes have additional methods and attributes for different usages. They include some support for static inference and local name scopes. Furthermore, astroid can also build partial trees by inspecting living objects.

Installation

Extract the tarball, jump into the created directory and run::

pip install .

If you want to do an editable installation, you can run::

pip install -e .

If you have any questions, please mail the code-quality@python.org mailing list for support. See http://mail.python.org/mailman/listinfo/code-quality for subscription information and archives.

Documentation

http://astroid.readthedocs.io/en/latest/

Python Versions

astroid 2.0 is currently available for Python 3 only. If you want Python 2 support, use an older version of astroid (though note that these versions are no longer supported).

Test

Tests are in the 'test' subdirectory. To launch the whole tests suite, you can use either tox or pytest::

tox
pytest