pythx


Namepythx JSON
Version 1.7.3 PyPI version JSON
download
home_pagehttps://github.com/dmuhs/pythx
SummaryA Python library for the MythX platform
upload_time2022-05-12 10:16:18
maintainer
docs_urlNone
authorDominik Muhs
requires_python>=3.6,<4
licenseMIT license
keywords pythx
VCS
bugtrack_url
requirements python-dateutil inflection PyJWT requests mythx-models
Travis-CI No Travis.
coveralls test coverage
            =====
PythX
=====


.. image:: https://img.shields.io/pypi/v/pythx.svg
        :target: https://pypi.org/project/pythx/

.. image:: https://travis-ci.org/dmuhs/pythx.svg?branch=master
        :target: https://travis-ci.org/dmuhs/pythx

.. image:: https://readthedocs.org/projects/pythx/badge/?version=latest
        :target: https://pythx.readthedocs.io/

.. image:: https://coveralls.io/repos/github/dmuhs/pythx/badge.svg?branch=master
        :target: https://coveralls.io/github/dmuhs/pythx?branch=master


PythX is a library for the MythX_ smart contract security analysis platform.

.. contents:: Table of Contents


What is MythX?
--------------
MythX is a security analysis API that allows anyone to create purpose-built
security tools for smart contract developers. Tools built on MythX integrate
seamlessly into the development environments and continuous integration
pipelines used throughout the Ethereum ecosystem.


Installation
------------
PythX runs on Python 3.6+ and PyPy3.

To get started, simply run

.. code-block:: console

    $ pip3 install pythx

Alternatively, clone the repository and run

.. code-block:: console

    $ pip3 install .

Or directly through Python's :code:`setuptools`:

.. code-block:: console

    $ python3 setup.py install

Example
-------
PythX aims to provide an easy-to-use interface to the official MythX_ API.
Its goal is to turbocharge tool development and make it easy to deal with
even complex use cases.

.. code-block:: python3

    from pythx import Client


    c = Client(api_key="...")

    # submit bytecode, source files, their AST and more!
    resp = c.analyze(bytecode="0xfe")

    # wait for the analysis to finish
    while not c.analysis_ready(resp.uuid):
        time.sleep(1)

    # have all your security report data at your fingertips
    for issue in c.report(resp.uuid):
        print(issue.swc_title or "Undefined", "-", issue.description_short)

    # Output:
    # Assert Violation - A reachable exception has been detected.


The PythX CLI has now become the MythX CLI!
-------------------------------------------

Originally, the PythX CLI was a proof of concept to display to interested
developers what can be done using the library. The interest in the CLI grew
so large that a lot of developers contacted me and asked for support and
new features.

This is the PSA that **I will no longer maintain the PythX CLI**. But wait!
There's more!

Because a PoC is not exactly what you would call future-proof and maintainable
software, I have decided to do a complete revamp. It is called `mythx-cli` and
incorporates all feature requests I have gotten so far. Check it out
`here <https://github.com/dmuhs/mythx-cli/>`_ and let me know what you think!

Enjoy! :)

.. _MythX: https://mythx.io/


=======
History
=======

1.6.1 [2020-06-16]
------------------

- Update :code:`mythx-models` dependency to omit stale warning


1.6.0 [2020-06-16]
------------------

- Disable model json schema validation and tests
- Various dependency upgrades


1.5.7 [2020-04-27]
------------------

- Add property checking middleware and tests
- Various dependency upgrades


1.5.6 [2020-04-21]
------------------

- Various critical dependency upgrades
- Fix bug where tests failed due to a data mismatch


1.5.5 [2020-02-24]
------------------

- Allow direct injection of domain model into client analyze method


1.5.4 [2020-02-20]
------------------

- Fix various dependency conflicts
- Add better documentation to readme file
- Update middleware type hints and documentation
- Update API module type hints and documentation
- Various dependency upgrades


1.5.3 [2020-02-10]
------------------

- Handle ambiguous :code:`MYTHX_API_URL` declarations
- Various dependency upgrades


1.5.2 [2020-01-30]
------------------

- Add additional analysis/group list filter parameters
- Various dependency upgrades


1.5.1 [2020-01-29]
------------------

- Remove trial user support as it has been dropped from the API


1.5.0 [2020-01-29]
------------------

- Add pypy3 tests in Travis CI
- Add additional query param support to analysis list handler
- Add various test suite improvements
- Drop support for Python 3.5 and add support for Python 3.8
- Remove stale parameter config options
- Remove stale configuration object support
- Improve PyPI trove classifiers
- Various dependency upgrades


1.4.1 [2019-11-19]
------------------

- Extend status code range for failure check in API handler


1.4.0 [2019-11-19]
------------------

- Fix bug where empty query parameters were sent to the API
- Introduce group ID/name middleware
- Add group status support in client
- Add group creation/sealing support in client
- Add group list support in client
- Fix dependency conflict between :code:`mythx-cli` and :code:`mythx-models`
- Various dependency upgrades

1.3.2 [2019-10-04]
------------------

- Update :code:`mythx-models` to 1.4.1


1.3.1 [2019-10-04]
------------------

- Update pytest from 5.1.2 to 5.2.0
- Update :code:`mythx-models` to 1.4.0

1.3.0 [2019-09-20]
------------------

- Remove the PythX CLI PoC
- Add PSA about deprecation and link to new :code:`mythx-cli` repository

1.2.6 [2019-09-19]
------------------

- Update twine from 1.14.0 to 1.15.0
- Bump :code:`mythx-models` to 1.3.5

1.2.5 [2019-09-15]
------------------

- Update twine from 1.13.0 to 1.14.0
- Clean up dependencies
- Bump :code:`mythx-models` to 1.3.3

1.2.4 [2019-09-06]
------------------

- Bump :code:`mythx-models` to 1.3.2
- Add support to fetch analysis result input by UUID

1.2.3 [2019-09-05]
------------------

- Add an auth check override to handle situations where only the access token is given

1.2.2 [2019-08-30]
------------------

- Update :code:`mythx-models` to 1.3.1

1.2.1 [2019-08-29]
------------------

- Update :code:`mythx-models` to 1.3.0

1.2.0 [2019-08-26]
------------------

- Add `mythx-models <https://github.com/dmuhs/mythx-models>`_ integration

1.1.8 [2019-06-05]
------------------

- Add debug flag to CLI
- Add support for the :code:`clientToolName` response field
- Add support for the new source list format validation
- Update the bumpversion expression to support black formatting

1.1.7 [2019-04-20]
------------------

- Add main docstring description


1.1.6 [2019-04-19]
------------------

- Add :code:`mainSource` support to CLI
- Fix bug where submission object was malformed ("AST" -> "ast")
- Upgrade pytest dependency


1.1.5 [2019-04-16]
------------------

- Add middleware to disable analysis cache
- Add CLI support to analyze compiled Truffle projects
- Fix bug where reports were not completely shown
- Update the authentication data format
- Add support for the mainSource field
- Add shortcut to inject middlewares in Client


1.1.4 [2019-03-28]
------------------

- Fix issue in schema detection
- Upgrade Sphinx dependency


1.1.3 [2019-03-25]
------------------

- Initial release!
- 100% branch coverage achieved
- 100% doc coverage achieved
- Examples provided in repo readme
- Automatic PyPI deployment on version tag change

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dmuhs/pythx",
    "name": "pythx",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6,<4",
    "maintainer_email": "",
    "keywords": "pythx",
    "author": "Dominik Muhs",
    "author_email": "dominik.muhs@consensys.net",
    "download_url": "https://files.pythonhosted.org/packages/fc/49/7d8c870405211489c9fa2c266c9296849ffa6a06f75fd5cf18eb3bc0d35b/pythx-1.7.3.tar.gz",
    "platform": null,
    "description": "=====\nPythX\n=====\n\n\n.. image:: https://img.shields.io/pypi/v/pythx.svg\n        :target: https://pypi.org/project/pythx/\n\n.. image:: https://travis-ci.org/dmuhs/pythx.svg?branch=master\n        :target: https://travis-ci.org/dmuhs/pythx\n\n.. image:: https://readthedocs.org/projects/pythx/badge/?version=latest\n        :target: https://pythx.readthedocs.io/\n\n.. image:: https://coveralls.io/repos/github/dmuhs/pythx/badge.svg?branch=master\n        :target: https://coveralls.io/github/dmuhs/pythx?branch=master\n\n\nPythX is a library for the MythX_ smart contract security analysis platform.\n\n.. contents:: Table of Contents\n\n\nWhat is MythX?\n--------------\nMythX is a security analysis API that allows anyone to create purpose-built\nsecurity tools for smart contract developers. Tools built on MythX integrate\nseamlessly into the development environments and continuous integration\npipelines used throughout the Ethereum ecosystem.\n\n\nInstallation\n------------\nPythX runs on Python 3.6+ and PyPy3.\n\nTo get started, simply run\n\n.. code-block:: console\n\n    $ pip3 install pythx\n\nAlternatively, clone the repository and run\n\n.. code-block:: console\n\n    $ pip3 install .\n\nOr directly through Python's :code:`setuptools`:\n\n.. code-block:: console\n\n    $ python3 setup.py install\n\nExample\n-------\nPythX aims to provide an easy-to-use interface to the official MythX_ API.\nIts goal is to turbocharge tool development and make it easy to deal with\neven complex use cases.\n\n.. code-block:: python3\n\n    from pythx import Client\n\n\n    c = Client(api_key=\"...\")\n\n    # submit bytecode, source files, their AST and more!\n    resp = c.analyze(bytecode=\"0xfe\")\n\n    # wait for the analysis to finish\n    while not c.analysis_ready(resp.uuid):\n        time.sleep(1)\n\n    # have all your security report data at your fingertips\n    for issue in c.report(resp.uuid):\n        print(issue.swc_title or \"Undefined\", \"-\", issue.description_short)\n\n    # Output:\n    # Assert Violation - A reachable exception has been detected.\n\n\nThe PythX CLI has now become the MythX CLI!\n-------------------------------------------\n\nOriginally, the PythX CLI was a proof of concept to display to interested\ndevelopers what can be done using the library. The interest in the CLI grew\nso large that a lot of developers contacted me and asked for support and\nnew features.\n\nThis is the PSA that **I will no longer maintain the PythX CLI**. But wait!\nThere's more!\n\nBecause a PoC is not exactly what you would call future-proof and maintainable\nsoftware, I have decided to do a complete revamp. It is called `mythx-cli` and\nincorporates all feature requests I have gotten so far. Check it out\n`here <https://github.com/dmuhs/mythx-cli/>`_ and let me know what you think!\n\nEnjoy! :)\n\n.. _MythX: https://mythx.io/\n\n\n=======\nHistory\n=======\n\n1.6.1 [2020-06-16]\n------------------\n\n- Update :code:`mythx-models` dependency to omit stale warning\n\n\n1.6.0 [2020-06-16]\n------------------\n\n- Disable model json schema validation and tests\n- Various dependency upgrades\n\n\n1.5.7 [2020-04-27]\n------------------\n\n- Add property checking middleware and tests\n- Various dependency upgrades\n\n\n1.5.6 [2020-04-21]\n------------------\n\n- Various critical dependency upgrades\n- Fix bug where tests failed due to a data mismatch\n\n\n1.5.5 [2020-02-24]\n------------------\n\n- Allow direct injection of domain model into client analyze method\n\n\n1.5.4 [2020-02-20]\n------------------\n\n- Fix various dependency conflicts\n- Add better documentation to readme file\n- Update middleware type hints and documentation\n- Update API module type hints and documentation\n- Various dependency upgrades\n\n\n1.5.3 [2020-02-10]\n------------------\n\n- Handle ambiguous :code:`MYTHX_API_URL` declarations\n- Various dependency upgrades\n\n\n1.5.2 [2020-01-30]\n------------------\n\n- Add additional analysis/group list filter parameters\n- Various dependency upgrades\n\n\n1.5.1 [2020-01-29]\n------------------\n\n- Remove trial user support as it has been dropped from the API\n\n\n1.5.0 [2020-01-29]\n------------------\n\n- Add pypy3 tests in Travis CI\n- Add additional query param support to analysis list handler\n- Add various test suite improvements\n- Drop support for Python 3.5 and add support for Python 3.8\n- Remove stale parameter config options\n- Remove stale configuration object support\n- Improve PyPI trove classifiers\n- Various dependency upgrades\n\n\n1.4.1 [2019-11-19]\n------------------\n\n- Extend status code range for failure check in API handler\n\n\n1.4.0 [2019-11-19]\n------------------\n\n- Fix bug where empty query parameters were sent to the API\n- Introduce group ID/name middleware\n- Add group status support in client\n- Add group creation/sealing support in client\n- Add group list support in client\n- Fix dependency conflict between :code:`mythx-cli` and :code:`mythx-models`\n- Various dependency upgrades\n\n1.3.2 [2019-10-04]\n------------------\n\n- Update :code:`mythx-models` to 1.4.1\n\n\n1.3.1 [2019-10-04]\n------------------\n\n- Update pytest from 5.1.2 to 5.2.0\n- Update :code:`mythx-models` to 1.4.0\n\n1.3.0 [2019-09-20]\n------------------\n\n- Remove the PythX CLI PoC\n- Add PSA about deprecation and link to new :code:`mythx-cli` repository\n\n1.2.6 [2019-09-19]\n------------------\n\n- Update twine from 1.14.0 to 1.15.0\n- Bump :code:`mythx-models` to 1.3.5\n\n1.2.5 [2019-09-15]\n------------------\n\n- Update twine from 1.13.0 to 1.14.0\n- Clean up dependencies\n- Bump :code:`mythx-models` to 1.3.3\n\n1.2.4 [2019-09-06]\n------------------\n\n- Bump :code:`mythx-models` to 1.3.2\n- Add support to fetch analysis result input by UUID\n\n1.2.3 [2019-09-05]\n------------------\n\n- Add an auth check override to handle situations where only the access token is given\n\n1.2.2 [2019-08-30]\n------------------\n\n- Update :code:`mythx-models` to 1.3.1\n\n1.2.1 [2019-08-29]\n------------------\n\n- Update :code:`mythx-models` to 1.3.0\n\n1.2.0 [2019-08-26]\n------------------\n\n- Add `mythx-models <https://github.com/dmuhs/mythx-models>`_ integration\n\n1.1.8 [2019-06-05]\n------------------\n\n- Add debug flag to CLI\n- Add support for the :code:`clientToolName` response field\n- Add support for the new source list format validation\n- Update the bumpversion expression to support black formatting\n\n1.1.7 [2019-04-20]\n------------------\n\n- Add main docstring description\n\n\n1.1.6 [2019-04-19]\n------------------\n\n- Add :code:`mainSource` support to CLI\n- Fix bug where submission object was malformed (\"AST\" -> \"ast\")\n- Upgrade pytest dependency\n\n\n1.1.5 [2019-04-16]\n------------------\n\n- Add middleware to disable analysis cache\n- Add CLI support to analyze compiled Truffle projects\n- Fix bug where reports were not completely shown\n- Update the authentication data format\n- Add support for the mainSource field\n- Add shortcut to inject middlewares in Client\n\n\n1.1.4 [2019-03-28]\n------------------\n\n- Fix issue in schema detection\n- Upgrade Sphinx dependency\n\n\n1.1.3 [2019-03-25]\n------------------\n\n- Initial release!\n- 100% branch coverage achieved\n- 100% doc coverage achieved\n- Examples provided in repo readme\n- Automatic PyPI deployment on version tag change\n",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "A Python library for the MythX platform",
    "version": "1.7.3",
    "split_keywords": [
        "pythx"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "89a9f2b64b27af5b22743e8b3e1b1e0d",
                "sha256": "91566851468f807d93e492225ede106d27e6017f4ee72e7ca626518896ae446a"
            },
            "downloads": -1,
            "filename": "pythx-1.7.3-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "89a9f2b64b27af5b22743e8b3e1b1e0d",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.6,<4",
            "size": 41513,
            "upload_time": "2022-05-12T10:16:16",
            "upload_time_iso_8601": "2022-05-12T10:16:16.427778Z",
            "url": "https://files.pythonhosted.org/packages/25/f6/93ec99d123ed099591089493c5298a9bba0183a274e341ef0818e281fb94/pythx-1.7.3-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "11ea9b6cbd67d7bf0f7a379eb8393b63",
                "sha256": "e2346d47c984f577636eef79f0c860eb091f3198861851c537443792a64643fd"
            },
            "downloads": -1,
            "filename": "pythx-1.7.3.tar.gz",
            "has_sig": false,
            "md5_digest": "11ea9b6cbd67d7bf0f7a379eb8393b63",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6,<4",
            "size": 182750,
            "upload_time": "2022-05-12T10:16:18",
            "upload_time_iso_8601": "2022-05-12T10:16:18.620088Z",
            "url": "https://files.pythonhosted.org/packages/fc/49/7d8c870405211489c9fa2c266c9296849ffa6a06f75fd5cf18eb3bc0d35b/pythx-1.7.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-05-12 10:16:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "dmuhs",
    "github_project": "pythx",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "python-dateutil",
            "specs": [
                [
                    "==",
                    "2.8.1"
                ]
            ]
        },
        {
            "name": "inflection",
            "specs": [
                [
                    "==",
                    "0.5.1"
                ]
            ]
        },
        {
            "name": "PyJWT",
            "specs": [
                [
                    "==",
                    "1.7.1"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.25.1"
                ]
            ]
        },
        {
            "name": "mythx-models",
            "specs": [
                [
                    "==",
                    "2.2.0"
                ]
            ]
        }
    ],
    "lcname": "pythx"
}
        
Elapsed time: 0.01881s