{"id":18468749,"url":"https://github.com/pycqa/redbaron","last_synced_at":"2025-05-14T23:08:08.673Z","repository":{"id":15297557,"uuid":"18027281","full_name":"PyCQA/redbaron","owner":"PyCQA","description":"Bottom-up approach to refactoring in python","archived":false,"fork":false,"pushed_at":"2022-01-29T21:54:37.000Z","size":1500,"stargazers_count":708,"open_issues_count":89,"forks_count":72,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-05-14T23:07:56.920Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://redbaron.pycqa.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyCQA.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["psycojoker"],"open_collective":"redbaron"}},"created_at":"2014-03-23T05:34:39.000Z","updated_at":"2025-05-12T14:47:22.000Z","dependencies_parsed_at":"2022-07-31T04:18:02.318Z","dependency_job_id":null,"html_url":"https://github.com/PyCQA/redbaron","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fredbaron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fredbaron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fredbaron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyCQA%2Fredbaron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyCQA","download_url":"https://codeload.github.com/PyCQA/redbaron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243363,"owners_count":22038046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T10:08:03.733Z","updated_at":"2025-05-14T23:08:03.661Z","avatar_url":"https://github.com/PyCQA.png","language":"Python","readme":"Introduction\n============\n\n[![Build Status](https://travis-ci.org/PyCQA/redbaron.svg?branch=master)](https://travis-ci.org/PyCQA/redbaron) [![Latest Version](https://img.shields.io/pypi/v/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Supported Python versions](https://img.shields.io/pypi/pyversions/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Development Status](https://img.shields.io/pypi/status/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Wheel Status](https://img.shields.io/pypi/wheel/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![Download format](https://img.shields.io/pypi/format/redbaron.svg)](https://pypi.python.org/pypi/redbaron/) [![License](https://img.shields.io/pypi/l/redbaron.svg)](https://pypi.python.org/pypi/redbaron/)\n[![Backers on Open Collective](https://opencollective.com/redbaron/backers/badge.svg)](#backers) \n[![Sponsors on Open Collective](https://opencollective.com/redbaron/sponsors/badge.svg)](#sponsors) \n\nRedBaron is a python library and tool powerful enough to be used into IPython\nsolely that intent to make the process of **writing code that modify source\ncode** as easy and as simple as possible. That include writing custom\nrefactoring, generic refactoring, tools, IDE or directly modifying you source\ncode into IPython with a higher and more powerful abstraction than the\nadvanced texts modification tools that you find in advanced text editors and\nIDE.\n\nRedBaron guaranteed you that **it will only modify your code where you ask him\nto**. To achieve this, it is based on [Baron](https://github.com/PyCQA/baron)\na lossless [AST](https://en.wikipedia.org/wiki/Abstract_syntax_tree) for\nPython that guarantees the operation \u003ccode\u003east_to_code(code_to_ast(source_code)) == source_code\u003c/code\u003e.\n(Baron's AST is called an FST, a Full Syntax Tree).\n\nRedBaron API and feel is heavily inspired by BeautifulSoup. It tries to be\nsimple and intuitive and that once you've get the basics principles, you are\ngood without reading the doc for 80% of your operations.\n\n**For now, RedBaron can be considered in alpha, the core is quite stable but it\nis not battle tested yet and is still a bit rough.** Feedback and contribution\nare very welcome.\n\nThe public documented API on the other side is guaranteed to be\nretro-compatible and won't break until 2.0 (if breaking is needed at that\npoint).\nThere might be the only exception that if you directly call specific nodes\nconstructors with FST that this API change, but this is not documented and\nsimply horribly unpracticable, so I'm expecting no one to do that.\n\nSupport\n=======\n\nRedBaron is support python python 2 and up to python 3.7 grammar.\n\nRoadmap\n=======\n\nCurrent roadmap is as boring as needed:\n\n* bug fixes\n* new small features (walker pattern, maybe code generation) and performance improvement.\n\nInstallation\n============\n\n    pip install redbaron[pygments]\n\nOr if you don't want to have syntax highlight in your shell or don't need it:\n\n    pip install redbaron\n\nRunning tests\n=============\n\n    pip install pytest\n    py.test tests\n\nCommunity\n=========\n\nYou can reach us on [irc.freenode.net#baron](https://webchat.freenode.net/?channels=%23baron) or [irc.freenode.net##python-code-quality](https://webchat.freenode.net/?channels=%23%23python-code-quality).\n\nFinancial support\n=================\n\nBaron and RedBaron are a very advanced piece of engineering that requires a lot\nof time of concentration to work on. Until the end of 2018, the development\nhas been a full volunteer work mostly done by [Bram](https://github.com/psycojoker),\nbut now, to reach the next level and bring those projects to the stability and\nquality you expect, we need your support.\n\nYou can join our contributors and sponsors on our transparent\n[OpenCollective](https://opencollective.com/redbaron), every contribution will\ncount and will be mainly used to work on the projects stability and quality but\nalso on continuing, on the side, the R\u0026D side of those projects.\n\n\n## Backers\n\nThank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/redbaron#backer)]\n\n\u003ca href=\"https://opencollective.com/redbaron#backers\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/backers.svg?width=890\"\u003e\u003c/a\u003e\n\n\n## Sponsors\n\nSupport this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/redbaron#sponsor)]\n\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/0/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/0/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/1/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/1/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/2/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/2/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/3/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/3/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/4/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/4/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/5/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/5/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/6/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/6/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/7/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/7/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/8/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/8/avatar.svg\"\u003e\u003c/a\u003e\n\u003ca href=\"https://opencollective.com/redbaron/sponsor/9/website\" target=\"_blank\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/sponsor/9/avatar.svg\"\u003e\u003c/a\u003e\n\n## Contributors\n\nThis project exists thanks to all the people who contribute. \n\u003ca href=\"https://github.com/PyCQA/redbaron/contributors\"\u003e\u003cimg src=\"https://opencollective.com/redbaron/contributors.svg?width=890\u0026button=false\" /\u003e\u003c/a\u003e\n\nCode of Conduct\n===============\n\nAs a member of [PyCQA](https://github.com/PyCQA), RedBaron follows its [Code of Conduct](http://meta.pycqa.org/en/latest/code-of-conduct.html).\n\nLinks\n=====\n\n**RedBaron is fully documented, be sure to check the tutorial and documentation**.\n\n* [Tutorial](https://redbaron.readthedocs.io/en/latest/tuto.html)\n* [Documentation](https://redbaron.readthedocs.io/en/latest/)\n* [Baron](https://github.com/PyCQA/baron)\n* IRC chat: [irc.freenode.net#baron](https://webchat.freenode.net/?channels=%23baron)\n","funding_links":["https://github.com/sponsors/psycojoker","https://opencollective.com/redbaron"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fredbaron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpycqa%2Fredbaron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpycqa%2Fredbaron/lists"}