Skip to main content

Abstraction on top of baron, a FST for python to make writing refactoring code a realistic task

Project description

Introduction

Build Status Latest Version Supported Python versions Development Status Wheel Status Download format License

RedBaron is a python library and tool powerful enough to be used into IPython solely that intent to make the process of writting code that modify source code as easy and as simple as possible. That include writing custom refactoring, generic refactoring, tools, IDE or directly modifying you source code into IPython with an higher and more powerful abstraction than the advanced texts modification tools that you find in advanced text editors and IDE.

RedBaron guaranteed you that it will only modify your code where you ask him to. To achieve this, it is based on Baron a lossless AST for Python that guarantees the operation ast_to_code(code_to_ast(source_code)) == source_code. (Baron’s AST is called a FST, a Full Syntax Tree).

RedBaron API and feel is heavily inspired by BeautifulSoup. It tries to be simple and intuitive and that once you’ve get the basics principles, you are good without reading the doc for 80% of your operations.

For now, RedBaron can be considered in alpha, the core is quite stable but it is not battle tested yet and is still a bit rough. Feedback is very welcome.

Installation

pip install redbaron

Changelog

0.5 (2015-01-31)

0.4 (2014-12-11)

  • compatibility with baron upstream (removal of def_argument_node and uniformisation of def_arguments structure)

  • fix: long wasn’t supported in redbaron (due to a bug in baron)

0.3 (2014-11-12)

  • proxy lists, major improvement in the management of list of things

  • .append_value is no more since it is useless now due to proxy lists

  • .index has been renamed to .index_on_parent to be more coherent

0.2 (2014-09-23)

0.1 (2014-06-13)

  • First release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redbaron-0.5.tar.gz (21.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

redbaron-0.5-py2.py3-none-any.whl (23.1 kB view details)

Uploaded Python 2Python 3

redbaron-0.5-py2.7.egg (19.7 kB view details)

Uploaded Egg

File details

Details for the file redbaron-0.5.tar.gz.

File metadata

  • Download URL: redbaron-0.5.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redbaron-0.5.tar.gz
Algorithm Hash digest
SHA256 3fd205969dfdd4691379a8124017e5f966350ad696d592dd438503b3cf56559f
MD5 05f54131e989249a26e740cb8198647f
BLAKE2b-256 4a3c2fd0fdb9062b5a79c3ef5ecaac2a6085658909ca95978ec73ee8259b9bc4

See more details on using hashes here.

File details

Details for the file redbaron-0.5-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for redbaron-0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8fe9b6ab391b0e4a9d6813f6ac1fd7d79c25fa28ba9a683496a36df63f2144dc
MD5 8abf2d24c85bf31cb167b309f2b576a0
BLAKE2b-256 94a3b347eb32317b0ee997e7bc6e8e51939b9ae5f49639669b40098274ed360e

See more details on using hashes here.

File details

Details for the file redbaron-0.5-py2.7.egg.

File metadata

  • Download URL: redbaron-0.5-py2.7.egg
  • Upload date:
  • Size: 19.7 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redbaron-0.5-py2.7.egg
Algorithm Hash digest
SHA256 a6e041e243532dc72680bc5c0e440d7d4dc94981e96c97eceffa445a405347cc
MD5 dd665668bca878a301678e0c35a59162
BLAKE2b-256 83b184708547ff4297ac1498c48d97cf45c22b56d5e9d9ac66d28320adc81b24

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page