comby-0.0.3
توضیحات
Lightweight language-independent syntax rewriting.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | comby-0.0.3 |
| نام | comby |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Christopher Timperley |
| ایمیل نویسنده | christimperley@googlemail.com |
| آدرس صفحه اصلی | https://github.com/ChrisTimperley/comby-python |
| آدرس اینترنتی | https://pypi.org/project/comby/ |
| مجوز | MIT |
.. -*-restructuredtext-*-
comby-python
============
.. image:: https://travis-ci.org/ChrisTimperley/comby-python.svg?branch=master
:target: https://travis-ci.org/ChrisTimperley/comby-python
.. image:: https://badge.fury.io/py/comby.svg
:target: https://badge.fury.io/py/comby
.. image:: https://img.shields.io/pypi/pyversions/comby.svg
:target: https://pypi.org/project/comby
Python bindings for `Comby <https://github.com/comby-tools/comby>`_.
Installation
------------
Comby must be installed: https://github.com/comby-tools/comby
To install the latest release from PyPI:
.. code:: shell
$ pip install comby
or to install from source:
.. code:: shell
$ pip install .
Getting Started
---------------
To perform a basic match-rewrite on a given source text:
.. code:: python
from comby import Comby
comby = Comby()
match = 'print :[[1]]'
rewrite = 'print(:[1])'
source_old = 'print "hello world"'
source_new = comby.rewrite(source_old, match, rewrite)
# -> 'print("hello world")
MIT License
Copyright (c) 2019 Christopher Timperley
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
نیازمندی
| مقدار | نام |
|---|---|
| >=19.2.0 | attrs |
| >=0.4 | loguru |
| ~=2.0 | requests |
| >=0.4 | typing |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl comby-0.0.3:
pip install comby-0.0.3.whl
نصب پکیج tar.gz comby-0.0.3:
pip install comby-0.0.3.tar.gz