astroid 4.1.2


pip install astroid

  Latest version

Released: Mar 22, 2026


Meta
Requires Python: >=3.10.0

Classifiers

Development Status
  • 6 - Mature

Environment
  • Console

Intended Audience
  • Developers

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Topic
  • Software Development :: Libraries :: Python Modules
  • Software Development :: Quality Assurance
  • Software Development :: Testing
Coverage badge from codecov Documentation Status https://img.shields.io/badge/code%20style-black-000000.svg pre-commit.ci status

Tidelift

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.

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
4.2.0b1 Mar 23, 2026
4.1.2 Mar 22, 2026
4.1.1 Feb 23, 2026
4.1.0 Feb 09, 2026
4.0.4 Feb 07, 2026
4.0.3 Jan 03, 2026
4.0.2 Nov 09, 2025
4.0.1 Oct 11, 2025
4.0.0 Oct 05, 2025
4.0.0rc0 Sep 29, 2025
4.0.0b3 Sep 22, 2025
4.0.0b2 Aug 07, 2025
4.0.0b1 Aug 06, 2025
4.0.0b0 Jul 27, 2025
4.0.0a0 Feb 03, 2025
3.3.11 Jul 13, 2025
3.3.10 May 10, 2025
3.3.9 Mar 09, 2025
3.3.8 Dec 24, 2024
3.3.7 Dec 21, 2024
3.3.6 Dec 08, 2024
3.3.5 Oct 04, 2024
3.3.4 Sep 23, 2024
3.3.3 Sep 20, 2024
3.3.2 Aug 11, 2024
3.3.1 Aug 06, 2024
3.3.0 Aug 04, 2024
3.2.4 Jul 20, 2024
3.2.3 Jul 11, 2024
3.2.2 May 19, 2024
3.2.1 May 16, 2024
3.2.0 May 07, 2024
3.1.0 Feb 23, 2024
3.0.3 Feb 04, 2024
3.0.2 Dec 12, 2023
3.0.1 Oct 16, 2023
3.0.0 Sep 26, 2023
3.0.0b0 Sep 24, 2023
3.0.0a9 Aug 06, 2023
3.0.0a8 Jul 15, 2023
3.0.0a7 Jul 08, 2023
3.0.0a6 Jul 04, 2023
3.0.0a5 Jun 13, 2023
3.0.0a4 Jun 06, 2023
3.0.0a3 May 14, 2023
3.0.0a2 Apr 25, 2023
3.0.0a1 Apr 25, 2023
2.15.8 Sep 26, 2023
2.15.7 Sep 23, 2023
2.15.6 Jul 08, 2023
2.15.5 May 14, 2023
2.15.4 Apr 24, 2023
2.15.3 Apr 16, 2023
2.15.2 Apr 03, 2023
2.15.1 Mar 26, 2023
2.15.0 Mar 05, 2023
2.14.2 Feb 12, 2023
2.14.1 Jan 31, 2023
2.14.0 Jan 31, 2023
2.13.5 Jan 31, 2023
2.13.4 Jan 31, 2023
2.13.3 Jan 20, 2023
2.13.2 Jan 08, 2023
2.13.1 Jan 08, 2023
2.13.0 Jan 07, 2023
2.12.14 Jan 06, 2023
2.12.13 Nov 19, 2022
2.12.12 Oct 19, 2022
2.12.11 Oct 10, 2022
2.12.10 Sep 17, 2022
2.12.9 Sep 07, 2022
2.12.8 Sep 06, 2022
2.12.7 Sep 06, 2022
2.12.6 Sep 05, 2022
2.12.5 Aug 29, 2022
2.12.4 Aug 25, 2022
2.12.3 Aug 23, 2022
2.12.2 Jul 12, 2022
2.12.1 Jul 10, 2022
2.12.0 Jul 09, 2022
2.11.7 Jul 09, 2022
2.11.6 Jun 13, 2022
2.11.5 May 09, 2022
2.11.4 May 02, 2022
2.11.3 Apr 19, 2022
2.11.2 Mar 26, 2022
2.11.1 Mar 22, 2022
2.11.0 Mar 12, 2022
2.10.0 Feb 27, 2022
2.9.3 Jan 09, 2022
2.9.2 Jan 03, 2022
2.9.1 Dec 31, 2021
2.9.0 Nov 21, 2021
2.8.6 Nov 21, 2021
2.8.5 Nov 12, 2021
2.8.4 Oct 25, 2021
2.8.3 Oct 17, 2021
2.8.2 Oct 07, 2021
2.8.2.dev0 Oct 06, 2021
2.8.1 Oct 07, 2021
2.8.0 Sep 14, 2021
2.7.3 Aug 30, 2021
2.7.2 Aug 20, 2021
2.7.1 Aug 16, 2021
2.7.0 Aug 16, 2021
2.6.6 Aug 03, 2021
2.6.5 Jul 21, 2021
2.6.4 Jul 19, 2021
2.6.3 Jul 19, 2021
2.6.2 Jun 30, 2021
2.6.1 Jun 29, 2021
2.6.0 Jun 22, 2021
2.6.0.dev0 Jun 16, 2021
2.5.8 Jun 07, 2021
2.5.7 May 29, 2021
2.5.6 Apr 25, 2021
2.5.5 Apr 24, 2021
2.5.4 Apr 24, 2021
2.5.3 Apr 10, 2021
2.5.2 Mar 28, 2021
2.5.1 Feb 28, 2021
2.5 Feb 15, 2021
2.4.2 Jun 08, 2020
2.4.1 May 05, 2020
2.4.0 Apr 27, 2020
2.3.3 Nov 06, 2019
2.3.2 Oct 18, 2019
2.3.1 Sep 30, 2019
2.3.0 Sep 24, 2019
2.2.5 Mar 08, 2019
2.2.4 Mar 05, 2019
2.2.3 Mar 04, 2019
2.2.2 Mar 02, 2019
2.2.1 Mar 02, 2019
2.2.0 Feb 27, 2019
2.2.0.dev1 Feb 20, 2019
2.2.0.dev0 Jan 20, 2019
2.1.0 Nov 25, 2018
2.1.0.dev0 Sep 30, 2018
2.0.4 Aug 10, 2018
2.0.3 Aug 08, 2018
2.0.2 Aug 01, 2018
2.0.1 Jul 19, 2018
2.0 Jul 15, 2018
2.0.0.dev4 Jul 05, 2018
2.0.0.dev3 Jun 20, 2018
2.0.0.dev2 Jun 19, 2018
2.0.0.dev1 May 28, 2018
2.0.0.dev0 May 21, 2018
1.6.6 Apr 09, 2019
1.6.5 Jun 06, 2018
1.6.4 May 15, 2018
1.6.3 Apr 05, 2018
1.6.2 Mar 16, 2018
1.6.1 Jan 23, 2018
1.6.0 Dec 15, 2017
1.5.3 Jun 03, 2017
1.5.2 Apr 17, 2017
1.5.1 Apr 13, 2017
1.5.0 Apr 13, 2017
1.4.9 Dec 18, 2016
1.4.8 Jul 26, 2016
1.4.7 Jul 07, 2016
1.4.6 Jun 06, 2016
1.4.5 Mar 21, 2016
1.4.4 Jan 15, 2016
1.4.3 Dec 24, 2015
1.4.2 Dec 21, 2015
1.4.1 Nov 29, 2015
1.4.0 Nov 29, 2015
1.3.8 Aug 02, 2015
1.3.7 Jul 27, 2015
1.3.6 Mar 14, 2015
1.3.5 Mar 11, 2015
1.3.4 Jan 16, 2015
1.3.3 Jan 16, 2015
1.3.2 Nov 22, 2014
1.3.1 Nov 21, 2014
1.3.0 Nov 20, 2014
1.2.1 Aug 24, 2014
1.2.0 Jul 25, 2014
1.1.1 Apr 30, 2014
1.1.0 Apr 18, 2014
1.0.1 Oct 18, 2013
1.0.0 Jul 30, 2013

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
typing-extensions (>=4)