Metadata-Version: 2.4
Name: retdec-python
Version: 0.5.2
Summary: A Python library and tools providing easy access to the retdec.com decompilation service through their public REST API.
Home-page: https://github.com/s3rvac/retdec-python
Author: Petr Zemek
Author-email: s3rvac@gmail.com
License: The MIT License (MIT)
        
        Copyright (c) 2015-2017 Petr Zemek <s3rvac@gmail.com> and contributors
        
        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.
        
Keywords: retdec decompiler decompilation analysis fileinfo
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE
Requires-Dist: requests
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

retdec-python
=============

.. image:: https://readthedocs.org/projects/retdec-python/badge/?version=latest
    :target: https://retdec-python.readthedocs.io/en/latest/
    :alt: Documentation Status

.. image:: https://travis-ci.org/s3rvac/retdec-python.svg
    :target: https://travis-ci.org/s3rvac/retdec-python
    :alt: Build Status

.. image:: https://coveralls.io/repos/s3rvac/retdec-python/badge.svg
    :target: https://coveralls.io/r/s3rvac/retdec-python
    :alt: Code Coverage Status

.. image:: https://badge.fury.io/py/retdec-python.svg
    :target: https://pypi.python.org/pypi/retdec-python
    :alt: PyPI Version

A Python library and tools providing easy access to the `retdec.com
<https://retdec.com>`_ decompilation service through their public `REST API
<https://retdec.com/api/>`_.

You can either incorporate the library in your own scripts:

.. code-block:: python

    from retdec.decompiler import Decompiler

    decompiler = Decompiler(api_key='YOUR-API-KEY')
    decompilation = decompiler.start_decompilation(input_file='file.exe')
    decompilation.wait_until_finished()
    decompilation.save_hll_code()

or you can use the provided script for stand-alone decompilations:

.. code-block:: text

    $ decompiler -k YOUR-API-KEY file.exe
    v23bmYb67R
    ----------

    Waiting for resources (0%)...                    [OK]
    Pre-Processing:
      Obtaining file information (5%)...             [OK]
      Unpacking (10%)...                             [OK]
    Front-End:
      Initializing (20%)...                          [OK]
    [..]
    Done (100%)...

    Downloading:
     - file.c

Either way, ``file.c`` then contains the decompiled C code:

.. code-block:: text

    $ cat file.c
    //
    // This file was generated by the Retargetable Decompiler
    // Website: https://retdec.com
    // Copyright (c) 2016 Retargetable Decompiler <info@retdec.com>
    //

    #include <stdio.h>
    [..]

Status
------

The library provides support for the `decompilation
<https://retdec.com/api/docs/decompiler.html>`_, `fileinfo
<https://retdec.com/api/docs/fileinfo.html>`_, and `test
<https://retdec.com/api/docs/test.html>`_ services. For a more detailed list,
see the `status <https://retdec-python.readthedocs.io/en/latest/status.html>`_
page in the documentation.

Requirements
------------

* Python >= 3.3 (CPython or PyPy)
* `requests <http://docs.python-requests.org>`_ module for making HTTPS calls
  to the `retdec.com API <https://retdec.com/api/>`_

Installation
------------

The recommended way of installing is from `Python Package Index
<https://pypi.python.org/pypi/retdec-python>`_ (PyPI) with `pip
<http://www.pip-installer.org/>`_:

.. code-block:: shell

    $ pip install retdec-python

This will install the latest stable version, including all dependencies. You
can also install the latest development version directly from GitHub:

.. code-block:: shell

    $ pip install git+https://github.com/s3rvac/retdec-python

Documentation
-------------

The documentation is available on `readthedocs.io <https://retdec-python.readthedocs.io>`_:

* `latest (master) <https://retdec-python.readthedocs.io/en/latest/>`_
* `stable (0.5.2) <https://retdec-python.readthedocs.io/en/stable/>`_

Contact and Support
-------------------

I will be very glad to get your feedback, `pull requests
<https://github.com/s3rvac/retdec-python/pulls>`_, `issues
<https://github.com/s3rvac/retdec-python/issues>`_, or just a simple *Thanks*.
Feel free to contact me for any questions you might have!

License
-------

Copyright (c) 2015-2017 Petr Zemek (s3rvac@gmail.com) and contributors.

Distributed under the MIT license. See the `LICENSE
<https://github.com/s3rvac/retdec-python/blob/master/LICENSE>`_ file for more
details.

Access from Other Languages
---------------------------

If you want to access the `retdec.com <https://retdec.com>`_ decompilation
service from other languages, check out the following projects:

* `retdec-rust <https://github.com/s3rvac/retdec-rust>`_ - A library and tools
  for accessing the service from Rust.
* `retdec-cpp <https://github.com/s3rvac/retdec-cpp>`_ - A library and tools
  for accessing the service from C++.
* `retdec-sh <https://github.com/s3rvac/retdec-sh>`_ - Scripts for accessing
  the service from shell.
