Py3AMF


NamePy3AMF JSON
Version 0.8.12 PyPI version JSON
download
home_pagehttps://github.com/StdCarrot/Py3AMF
SummaryAMF support for Python
upload_time2024-01-23 14:53:46
maintainer
docs_urlNone
authorThe Py3AMF Project
requires_python
licenseMIT License
keywords python3 amf amf0 amf3 flex flash remoting rpc http flashplayer air bytearray
VCS
bugtrack_url
requirements defusedxml
Travis-CI
coveralls test coverage No coveralls.
            objectproxy arraycollection recordset actionscript decoder encoder gateway
remoteobject twisted pylons django sharedobject lso sol
Classifier: Framework :: Django
Classifier: Framework :: Pylons
Classifier: Framework :: Twisted
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Development Status :: 5 - Production/Stable
Provides-Extra: twisted
Provides-Extra: django
Provides-Extra: sqlalchemy
Provides-Extra: elixir
Provides-Extra: lxml
Provides-Extra: six
License-File: LICENSE.txt

Py3AMF
======

Py3AMF is fork of `PyAMF <https://github.com/hydralabs/pyamf>`__ to
support Python3

Why Py3AMF
~~~~~~~~~~

By states of issues and PR in
`PyAMF <https://github.com/hydralabs/pyamf>`__, it dosen’t seems to be
under developing. And another PR that supports Py3 has been discontinued
for over two years. This is the only Python AMF Project which trying to
support Py3 under developing on GitHub.

State
~~~~~

Pass ``setup.py test`` But, adapters were not tested

Warning
~~~~~~~

This project isn’t completed. If you want to make it fast, please send
PR.

Install
~~~~~~~

This was tested on Ubuntu 16.04.2 and macOS 10.12.4

To install, you can use pip3 on your environment.

::

   pip3 install Py3AMF

Or, you can use setup.py to develop.

::

   git clone git@github.com:StdCarrot/Py3AMF.git
   cd Py3AMF
   # python3 setup.py test
   python3 setup.py install

Simple example
~~~~~~~~~~~~~~

Everything is same with PyAMF, but you have to concern str and bytes
types.

::

   import pyamf
   from pyamf import remoting
   from pyamf.flex import messaging
   import uuid
   import requests

   msg = messaging.RemotingMessage(operation='retrieveUser',
                                   destination='so.stdc.flexact.common.User',
                                   messageId=str(uuid.uuid4()).upper(),
                                   body=['user_id'])
   req = remoting.Request(target='UserService', body=[msg])
   ev = remoting.Envelope(pyamf.AMF3)
   ev['/0'] = req

   # Encode request
   bin_msg = remoting.encode(ev)

   # Send request; You can use other channels like RTMP
   resp = requests.post('http://example.com/amf',
                        data=bin_msg.getvalue(),
                        headers={'Content-Type': 'application/x-amf'})

   # Decode response
   resp_msg = remoting.decode(resp.content)
   print(resp_msg.bodies)

TODO
----

-  Check adapters

--------------

`PyAMF <http://www.pyamf.org>`__ provides Action Message Format
(`AMF <http://en.wikipedia.org/wiki/Action_Message_Format>`__) support
for `Python <http://python.org>`__ that is compatible with the `Adobe
Flash Player <http://en.wikipedia.org/wiki/Flash_Player>`__. It includes
integration with Python web frameworks like
`Django <http://djangoproject.com>`__, `Pylons <http://pylonshq.com>`__,
`Twisted <http://twistedmatrix.com>`__,
`SQLAlchemy <http://sqlalchemy.org>`__,
`web2py <http://www.web2py.com>`__ and
`more <http://pyamf.org/tutorials/index.html>`__.

The `Adobe Integrated
Runtime <http://en.wikipedia.org/wiki/Adobe_AIR>`__ and `Adobe Flash
Player <http://en.wikipedia.org/wiki/Flash_Player>`__ use AMF to
communicate between an application and a remote server. AMF encodes
remote procedure calls (RPC) into a compact binary representation that
can be transferred over HTTP/HTTPS or the
`RTMP/RTMPS <http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol>`__
protocol. Objects and data values are serialized into this binary
format, which increases performance, allowing applications to load data
up to 10 times faster than with text-based formats such as XML or SOAP.

AMF3, the default serialization for
`ActionScript <http://dev.pyamf.org/wiki/ActionScript>`__ 3.0, provides
various advantages over AMF0, which is used for ActionScript 1.0 and
2.0. AMF3 sends data over the network more efficiently than AMF0. AMF3
supports sending ``int`` and ``uint`` objects as integers and supports
data types that are available only in ActionScript 3.0, such as
`ByteArray <http://dev.pyamf.org/wiki/ByteArray>`__,
`ArrayCollection <http://dev.pyamf.org/wiki/ArrayCollection>`__,
`ObjectProxy <http://dev.pyamf.org/wiki/ObjectProxy>`__ and
`IExternalizable <http://dev.pyamf.org/wiki/IExternalizable>`__.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/StdCarrot/Py3AMF",
    "name": "Py3AMF",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "python3 amf amf0 amf3 flex flash remoting rpc http flashplayer air bytearray",
    "author": "The Py3AMF Project",
    "author_email": "yhbu@stdc.so",
    "download_url": "",
    "platform": null,
    "description": "objectproxy arraycollection recordset actionscript decoder encoder gateway\nremoteobject twisted pylons django sharedobject lso sol\nClassifier: Framework :: Django\nClassifier: Framework :: Pylons\nClassifier: Framework :: Twisted\nClassifier: Intended Audience :: Developers\nClassifier: Intended Audience :: Information Technology\nClassifier: License :: OSI Approved :: MIT License\nClassifier: Natural Language :: English\nClassifier: Operating System :: OS Independent\nClassifier: Programming Language :: C\nClassifier: Programming Language :: Python\nClassifier: Programming Language :: Cython\nClassifier: Programming Language :: Python :: 3.5\nClassifier: Programming Language :: Python :: 3.6\nClassifier: Programming Language :: Python :: 3.7\nClassifier: Programming Language :: Python :: 3.8\nClassifier: Programming Language :: Python :: 3.9\nClassifier: Programming Language :: Python :: 3.10\nClassifier: Programming Language :: Python :: 3.11\nClassifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application\nClassifier: Topic :: Software Development :: Libraries :: Python Modules\nClassifier: Development Status :: 5 - Production/Stable\nProvides-Extra: twisted\nProvides-Extra: django\nProvides-Extra: sqlalchemy\nProvides-Extra: elixir\nProvides-Extra: lxml\nProvides-Extra: six\nLicense-File: LICENSE.txt\n\nPy3AMF\n======\n\nPy3AMF is fork of `PyAMF <https://github.com/hydralabs/pyamf>`__ to\nsupport Python3\n\nWhy Py3AMF\n~~~~~~~~~~\n\nBy states of issues and PR in\n`PyAMF <https://github.com/hydralabs/pyamf>`__, it dosen\u2019t seems to be\nunder developing. And another PR that supports Py3 has been discontinued\nfor over two years. This is the only Python AMF Project which trying to\nsupport Py3 under developing on GitHub.\n\nState\n~~~~~\n\nPass ``setup.py test`` But, adapters were not tested\n\nWarning\n~~~~~~~\n\nThis project isn\u2019t completed. If you want to make it fast, please send\nPR.\n\nInstall\n~~~~~~~\n\nThis was tested on Ubuntu 16.04.2 and macOS 10.12.4\n\nTo install, you can use pip3 on your environment.\n\n::\n\n   pip3 install Py3AMF\n\nOr, you can use setup.py to develop.\n\n::\n\n   git clone git@github.com:StdCarrot/Py3AMF.git\n   cd Py3AMF\n   # python3 setup.py test\n   python3 setup.py install\n\nSimple example\n~~~~~~~~~~~~~~\n\nEverything is same with PyAMF, but you have to concern str and bytes\ntypes.\n\n::\n\n   import pyamf\n   from pyamf import remoting\n   from pyamf.flex import messaging\n   import uuid\n   import requests\n\n   msg = messaging.RemotingMessage(operation='retrieveUser',\n                                   destination='so.stdc.flexact.common.User',\n                                   messageId=str(uuid.uuid4()).upper(),\n                                   body=['user_id'])\n   req = remoting.Request(target='UserService', body=[msg])\n   ev = remoting.Envelope(pyamf.AMF3)\n   ev['/0'] = req\n\n   # Encode request\n   bin_msg = remoting.encode(ev)\n\n   # Send request; You can use other channels like RTMP\n   resp = requests.post('http://example.com/amf',\n                        data=bin_msg.getvalue(),\n                        headers={'Content-Type': 'application/x-amf'})\n\n   # Decode response\n   resp_msg = remoting.decode(resp.content)\n   print(resp_msg.bodies)\n\nTODO\n----\n\n-  Check adapters\n\n--------------\n\n`PyAMF <http://www.pyamf.org>`__ provides Action Message Format\n(`AMF <http://en.wikipedia.org/wiki/Action_Message_Format>`__) support\nfor `Python <http://python.org>`__ that is compatible with the `Adobe\nFlash Player <http://en.wikipedia.org/wiki/Flash_Player>`__. It includes\nintegration with Python web frameworks like\n`Django <http://djangoproject.com>`__, `Pylons <http://pylonshq.com>`__,\n`Twisted <http://twistedmatrix.com>`__,\n`SQLAlchemy <http://sqlalchemy.org>`__,\n`web2py <http://www.web2py.com>`__ and\n`more <http://pyamf.org/tutorials/index.html>`__.\n\nThe `Adobe Integrated\nRuntime <http://en.wikipedia.org/wiki/Adobe_AIR>`__ and `Adobe Flash\nPlayer <http://en.wikipedia.org/wiki/Flash_Player>`__ use AMF to\ncommunicate between an application and a remote server. AMF encodes\nremote procedure calls (RPC) into a compact binary representation that\ncan be transferred over HTTP/HTTPS or the\n`RTMP/RTMPS <http://en.wikipedia.org/wiki/Real_Time_Messaging_Protocol>`__\nprotocol. Objects and data values are serialized into this binary\nformat, which increases performance, allowing applications to load data\nup to 10 times faster than with text-based formats such as XML or SOAP.\n\nAMF3, the default serialization for\n`ActionScript <http://dev.pyamf.org/wiki/ActionScript>`__ 3.0, provides\nvarious advantages over AMF0, which is used for ActionScript 1.0 and\n2.0. AMF3 sends data over the network more efficiently than AMF0. AMF3\nsupports sending ``int`` and ``uint`` objects as integers and supports\ndata types that are available only in ActionScript 3.0, such as\n`ByteArray <http://dev.pyamf.org/wiki/ByteArray>`__,\n`ArrayCollection <http://dev.pyamf.org/wiki/ArrayCollection>`__,\n`ObjectProxy <http://dev.pyamf.org/wiki/ObjectProxy>`__ and\n`IExternalizable <http://dev.pyamf.org/wiki/IExternalizable>`__.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "AMF support for Python",
    "version": "0.8.12",
    "project_urls": {
        "Homepage": "https://github.com/StdCarrot/Py3AMF"
    },
    "split_keywords": [
        "python3",
        "amf",
        "amf0",
        "amf3",
        "flex",
        "flash",
        "remoting",
        "rpc",
        "http",
        "flashplayer",
        "air",
        "bytearray"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2e49ef7c176000ff0d9a02b53d4d067bab7491368cbfe23293dde4d10d7ca31f",
                "md5": "d8835305bdeb52996c75390d187c0777",
                "sha256": "fde0e25ee80f51c6ef19e13756c00f5d060396e360377d5e5111c6f17b3fec5c"
            },
            "downloads": -1,
            "filename": "Py3AMF-0.8.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d8835305bdeb52996c75390d187c0777",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 201594,
            "upload_time": "2024-01-23T14:53:46",
            "upload_time_iso_8601": "2024-01-23T14:53:46.232359Z",
            "url": "https://files.pythonhosted.org/packages/2e/49/ef7c176000ff0d9a02b53d4d067bab7491368cbfe23293dde4d10d7ca31f/Py3AMF-0.8.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 14:53:46",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "StdCarrot",
    "github_project": "Py3AMF",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "defusedxml",
            "specs": []
        }
    ],
    "lcname": "py3amf"
}
        
Elapsed time: 0.17052s