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.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.3.tar.gz (19.3 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.3-py2.py3-none-any.whl (21.1 kB view details)

Uploaded Python 2Python 3

redbaron-0.3-py2.7.egg (18.3 kB view details)

Uploaded Egg

File details

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

File metadata

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

File hashes

Hashes for redbaron-0.3.tar.gz
Algorithm Hash digest
SHA256 d73652221a7d5f6da89aaedb99575abefbc3c7fb5f58b1b69cff92230c21539a
MD5 25c0339a02763c21247a7a987324cab8
BLAKE2b-256 42d5dbf095594275b823f481d429164876d5e82faac3e9e7306ebdfd1db71c88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for redbaron-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e65522a473d53739888a9017731269e866e28f3c73408fbcd6128846dfc8676f
MD5 51304da03607e56154a69def1d54ed61
BLAKE2b-256 1bca76d75ff9830bc2f083b0186b4656f776cee15db2649e8a684acbdfd47435

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for redbaron-0.3-py2.7.egg
Algorithm Hash digest
SHA256 189f0f1239006d0f1d5fd5ce6b069c6066bd4848668e0753b4f31e884344befc
MD5 b0109d609f531fe933b29faa8e737270
BLAKE2b-256 e9fe6c35514ff1405d9ea1726256f1aaaf022efa5376ab8517c5653bb4fe3cd0

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