meta


Namemeta JSON
Version 1.0.2 PyPI version JSON
download
home_pagehttp://srossross.github.com/Meta
SummaryByte-code and ast programming tools
upload_time2018-08-17 06:01:31
maintainer
docs_urlNone
authorSean Ross-Ross
requires_python
licenseBSD
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Meta
====

A Pure Python module containing a framework to manipulate and analyze
python abstract syntax trees and bytecode.

Example
========

This shows how to take python source to a code object and back again from within python:

.. code-block:: python

    import meta, ast
    source = '''
    a = 1
    b = 2
    c = (a ** b)
    '''

    mod = ast.parse(source, '<nofile>', 'exec')
    code = compile(mod, '<nofile>', 'exec')

    mod2 = meta.decompile(code)
    source2 = meta.dump_python_source(mod2)

    assert source == source2

This shows the depyc script. The script compiles itself, and then the compiled script extracts itself:

.. code-block:: bash

    DEPYC_FILE=`python -c"import meta.scripts.depyc; print meta.scripts.depyc.__file__"`
    depyc $DEPYC_FILE --pyc > depycX.pyc
    python -m depycX depycX.pyc --python > depycX.py
    echo depycX.py


Notes
======

* Meta is python3 compliant (mostly)

Bugs
=====

* The decompliler does not yet support complex list/set/dict - comprehensions

Testing
=======

.. code-block:: bash

    python -m unittest discover meta

    test


Versioning
==========
From the version 1.0.0, Meta follows `Semantic Versioning <http://semver.org/spec/v1.0.0.html>`_.
The version X.Y.Z indicates:

* X is the major version (backward-incompatible),
* Y is the minor version (backward-compatible), and
* Z is the patch version (backward-compatible bug fix).

Prior to version 1.0.0, custom versioning scheme was used.
            

Raw data

            {
    "_id": null,
    "home_page": "http://srossross.github.com/Meta",
    "name": "meta",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Sean Ross-Ross",
    "author_email": "enthought-dev@enthought.com",
    "download_url": "https://files.pythonhosted.org/packages/78/4e/bf6414dd628664eee7d03831f36fe9ffd43708c36c8bd43ae56ebe7cd69d/meta-1.0.2.tar.gz",
    "platform": "Windows",
    "description": "Meta\n====\n\nA Pure Python module containing a framework to manipulate and analyze\npython abstract syntax trees and bytecode.\n\nExample\n========\n\nThis shows how to take python source to a code object and back again from within python:\n\n.. code-block:: python\n\n    import meta, ast\n    source = '''\n    a = 1\n    b = 2\n    c = (a ** b)\n    '''\n\n    mod = ast.parse(source, '<nofile>', 'exec')\n    code = compile(mod, '<nofile>', 'exec')\n\n    mod2 = meta.decompile(code)\n    source2 = meta.dump_python_source(mod2)\n\n    assert source == source2\n\nThis shows the depyc script. The script compiles itself, and then the compiled script extracts itself:\n\n.. code-block:: bash\n\n    DEPYC_FILE=`python -c\"import meta.scripts.depyc; print meta.scripts.depyc.__file__\"`\n    depyc $DEPYC_FILE --pyc > depycX.pyc\n    python -m depycX depycX.pyc --python > depycX.py\n    echo depycX.py\n\n\nNotes\n======\n\n* Meta is python3 compliant (mostly)\n\nBugs\n=====\n\n* The decompliler does not yet support complex list/set/dict - comprehensions\n\nTesting\n=======\n\n.. code-block:: bash\n\n    python -m unittest discover meta\n\n    test\n\n\nVersioning\n==========\nFrom the version 1.0.0, Meta follows `Semantic Versioning <http://semver.org/spec/v1.0.0.html>`_.\nThe version X.Y.Z indicates:\n\n* X is the major version (backward-incompatible),\n* Y is the minor version (backward-compatible), and\n* Z is the patch version (backward-compatible bug fix).\n\nPrior to version 1.0.0, custom versioning scheme was used.",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Byte-code and ast programming tools",
    "version": "1.0.2",
    "project_urls": {
        "Homepage": "http://srossross.github.com/Meta"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "784ebf6414dd628664eee7d03831f36fe9ffd43708c36c8bd43ae56ebe7cd69d",
                "md5": "692cedf8322dde634d372192bef19131",
                "sha256": "35bbd24f212c09e04836ef4cac3e3a0e16e24e89e5452c6072a517bf674b0676"
            },
            "downloads": -1,
            "filename": "meta-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "692cedf8322dde634d372192bef19131",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 49335,
            "upload_time": "2018-08-17T06:01:31",
            "upload_time_iso_8601": "2018-08-17T06:01:31.137080Z",
            "url": "https://files.pythonhosted.org/packages/78/4e/bf6414dd628664eee7d03831f36fe9ffd43708c36c8bd43ae56ebe7cd69d/meta-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2018-08-17 06:01:31",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "meta"
}
        
Elapsed time: 0.37291s