{ "info": { "author": "Roman Yepishev", "author_email": "rye@keypressure.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4" ], "description": "=========================\nMediaFire Python Open SDK\n=========================\n\n\nThis is a Python implementation of `MediaFire Core API`_ client.\n\n.. _MediaFire Core Api: http://www.mediafire.com/developers/core_api/\n\n.. image:: https://travis-ci.org/roman-yepishev/mediafire-python-open-sdk.svg?branch=master\n :target: https://travis-ci.org/roman-yepishev/mediafire-python-open-sdk\n\n==========\nInstalling\n==========\n\n.. code-block:: bash\n\n $ pip install mediafire\n\n==================\nWhat should I use?\n==================\n\nIf you are in a hurry, use ``MediaFireClient`` - it contains enough functions to\nget your uploads/downloads and file listings working. It does not have a stable API,\nand has rudimentary test coverage only.\n\nYou may want to stick to ``MediaFireApi`` and ``MediaFireUploader`` to have as much\ncontrol as possible over your application flow.\n\n======================\nmediafire.MediaFireApi\n======================\n\nAPI Client library provides an interface to MediaFire API. It handles\nrequests, responses, signatures and errors.\n\nUsage:\n\n.. code-block:: python\n\n from mediafire import MediaFireApi\n\n api = MediaFireApi()\n session = api.user_get_session_token(\n email='your.email@example.net',\n password='password',\n app_id='42511')\n\n # API client does not know about the token\n # until explicitly told about it:\n api.session = session\n\n response = api.user_get_info()\n print(response['user_info']['display_name'])\n\n # Or directly for methods that are not yet wrapped\n response = api.request(\"upload/add_web_upload\", {\n \"url\": \"http://forum.mediafiredev.com/images/mfforumlogo.png\",\n \"filename\": \"mfforumlogo.png\"})\n\n response = api.request(\"upload/get_web_uploads\",\n {\"key\": response['upload_key']})\n\n\nAPI Client library supports operation w/o session_token. In this case all\noperations that do require session_token will fail with Access denied error:\n\n.. code-block:: python\n\n from mediafire import MediaFireApi\n\n api = MediaFireApi()\n response = api.system_get_info()\n print(response) # prints system info\n\n response = api.user_get_info() # fails with \"Session token is missing\"\n\nOnce set, session token can be unset:\n\n.. code-block:: python\n\n api.session = None\n # or\n del api.session\n\nFor information on wrapped methods, see ``pydoc mediafire.api``. For\ndocumentation on actual values expected, see `MediaFire Core API`_\ndocumentation.\n\nAll wrapped methods follow the same naming convention, ``category_action``, so\nupload/instant is ``upload_instant``.\n\nYou can construct the call yourself easily:\n\n.. code-block:: python\n\n response = api.request(\"user/set_avatar\",\n {\"quick_key\": \"123456789012345\"})\n\nDownloading\n-----------\n\nAPI client does not handle regular file downloads because these are simple HTTP requests\nto URLs returned by \"file/get_links\". Here's how you can do that yourself:\n\n.. code-block:: python\n\n response = api.file_get_links('c94lcpx3vax6xp3')\n normal_download_url = response['links'][0]['normal_download']\n\n response = requests.get(normal_download_url, stream=True)\n with io.open(\"/tmp/green.jpg\", 'wb') as fd:\n for chunk in response.iter_content(chunk_size=4096):\n fd.write(chunk)\n\nIn case response is a file download, e.g. ``file/zip``, the response returned\nis a `requests.Response`_ object, which you can read from:\n\n.. code-block:: python\n\n ...\n response = api.request(\"file/zip\", {\"keys\": \"c94lcpx3vax6xp3\"})\n with io.open(\"/tmp/green.zip\", 'wb') as fd:\n for chunk in response.iter_content(chunk_size=4096):\n fd.write(chunk)\n ...\n\n.. _requests.Response: http://docs.python-requests.org/en/latest/api/#requests.Response\n\nSee Download_ documentation for more information.\n\n.. _Download: http://www.mediafire.com/developers/core_api/1.2/download/\n\n===========================\nmediafire.MediaFireUploader\n===========================\n\nMediaFire supports several upload methods and `MediaFireUploader` exposes a\nsingle `upload` method to make things easier:\n\n.. code-block:: python\n\n from mediafire import (MediaFireApi, MediaFireUploader)\n\n api = MediaFireApi()\n uploader = MediaFireUploader(api)\n\n # ... authenticate ...\n\n fd = open('/path/to/file', 'rb')\n\n result = uploader.upload(fd, 'Some filename.txt',\n folder_key='1234567890123')\n\n pprint(api.file_get_info(result.quickkey))\n\n``result`` is a ``mediafire.uploader.UploadResult`` instance.\n\nFileDrop\n--------\n\nFor FileDrop uploads (i.e. when filedrop_key is used) only ``upload/instant``\nresult has quickkey. ``upload/instant`` and ``upload/resumable`` return\n``None`` for all the fields, since ``upload/poll`` does not support\nencrypted upload key.\n\n\n======================================\nmediafire.media.ConversionServerClient\n======================================\n\nThis API is subject to change\n\nThis is a very thin layer on top of Image and Document conversion API.\n\n.. code-block:: python\n\n from mediafire.media import ConversionServerClient\n\n conv = ConversionServerClient()\n\n response = conv.request('2004', 'm8d6blce79xhxl5', 'i', size_id='1')\n with open('/tmp/example.jpg', 'rb') as fd:\n fd.write(response.content)\n\n\n================================\nmediafire.client.MediaFireClient\n================================\n\nThis API is subject to change\n\nHigh-level client library wraps API calls and presents simplified interface.\n\nSupported operations:\n\n* File upload\n* File download (direct download link)\n* Listing directories\n* Creating directories\n* Removing files and directories\n* Getting info about files and directories\n\nMediaFire resources can be referenced by path or by quickkey/folderkey.\n\n* **path**: ``mf:/Pictures/Sample.jpg`` or ``/Pictures/Sample.jpg``\n* **folder_key**: ``mf:6302u1a9p0a9x`` (``folder_key`` is 13 chars long)\n* **quick_key**: ``mf:46d3y4p8542kiyp`` (``quick_key`` is 15 chars long)\n\n.. code-block:: python\n\n from mediafire.client import (MediaFireClient, File, Folder)\n\n client = MediaFireClient()\n client.login(email='your.email@example.net',\n password='password',\n app_id='42511')\n\n client.upload_file(\"flower.jpg\", \"mf:/Pictures/\")\n client.download_file(\"mf:/Pictures/flower.jpg\",\n \"flower-from-mediafire.jpg\")\n\n for item in client.get_folder_contents_iter(\"mf:/Pictures\"):\n if type(item) is File:\n print(\"File: {}\".format(item['filename']))\n elif type(item) is Folder:\n print(\"Folder: {}\".format(item['name']))\n\nSee ``examples/mediafire-cli.py`` for high-level client usage.\n\nRequirements\n------------\n\n* python 2.7 or 3.4\n* six\n* requests\n* requests\\_toolbelt\n* responses (for testing)\n\nTests\n-----\n\nTest suite is located under ``tests/``\n\n.. code-block:: bash\n\n\n git clone https://github.com/MediaFire/mediafire-python-open-sdk.git\n cd mediafire-python-open-sdk\n # Run tests with python 3 interpreter\n PYTHONPATH=. python3 -munittest\n # Run tests with python 2 interpreter\n PYTHONPATH=. python -munittest discover\n\n================\nReporting issues\n================\n\nPlease use the `MediaFire/mediafire-python-open-sdk`_ project issue tracker\nto report issues with the implementation.\n\n.. _MediaFire/mediafire-python-open-sdk: https://github.com/MediaFire/mediafire-python-open-sdk\n\n\n=================\nAbout and License\n=================\n\nCopyright (c) 2014, Roman Yepishev. All rights reserved. Website: http://www.keypressure.com\n\nThis project was forked by MediaFire with explicit permission from Roman Yepishev on 10.24.2014\n\nThis project is made under BSD license. See LICENSE file for more information.\n\nMediaFire\u00ae is a registered trademark of the MediaFire, LLC.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/MediaFire/mediafire-python-open-sdk", "keywords": "mediafire cloud files sdk storage api upload", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "mediafire", "package_url": "https://pypi.org/project/mediafire/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mediafire/", "project_urls": { "Homepage": "https://github.com/MediaFire/mediafire-python-open-sdk" }, "release_url": "https://pypi.org/project/mediafire/0.6.0/", "requires_dist": [ "requests (<=2.11.1,>=2.4.1)", "requests-toolbelt (>=0.3.1)", "six (>=1.8.0)" ], "requires_python": "", "summary": "Python MediaFire client library", "version": "0.6.0" }, "last_serial": 2463313, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "531cba2f8bd01b41c13d1afd0e18688b", "sha256": "56147b587e463754fe5ab28b2fccc45058f2c291b9f822706ced9eeeae6e291a" }, "downloads": -1, "filename": "mediafire-0.2.0.tar.gz", "has_sig": true, "md5_digest": "531cba2f8bd01b41c13d1afd0e18688b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16513, "upload_time": "2014-11-02T14:39:15", "url": "https://files.pythonhosted.org/packages/0c/43/5677dddd7c85fceb30958f30f29930d041708cc1b2b50869a43d6ac3819b/mediafire-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "7b1d456913526fccf1b09b21d7581982", "sha256": "732a19e326c4d56400ad837393f9892ae417d76690685175400b061a02d608f8" }, "downloads": -1, "filename": "mediafire-0.3.0.tar.gz", "has_sig": true, "md5_digest": "7b1d456913526fccf1b09b21d7581982", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17623, "upload_time": "2014-11-08T01:06:30", "url": "https://files.pythonhosted.org/packages/66/b5/9db7c62c1e1a3ba28d6ab52e56294f8684e8b231b24ce4f1a217e2292b02/mediafire-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "83ff87859a3f41aff4f08edfa198bfe0", "sha256": "1fafe0115628aabbf108361be5474477721b92744c757bd22ec8c329596531e8" }, "downloads": -1, "filename": "mediafire-0.4.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "83ff87859a3f41aff4f08edfa198bfe0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24120, "upload_time": "2015-05-09T12:38:58", "url": "https://files.pythonhosted.org/packages/9d/55/fc2c8a52d7c00d3aaa1db1352d1598eb0cf4be7f31808aa493269fc07d52/mediafire-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5bcb90982d05f5e4b01ab3b5174130d9", "sha256": "189f21dc946f3c2bef50d72b1765a7a4a46047eead82c891a578bf82b8cad752" }, "downloads": -1, "filename": "mediafire-0.4.0.tar.gz", "has_sig": true, "md5_digest": "5bcb90982d05f5e4b01ab3b5174130d9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22359, "upload_time": "2015-05-09T12:39:38", "url": "https://files.pythonhosted.org/packages/d0/3e/4a72cc77291110e5afa454d54f87700cf7c8a40372428f7a99b0b6f98b26/mediafire-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "69ec4e473743c085de2117a86f11db80", "sha256": "12a57b2392e68b6da4420ae5d8192a632155279d6a2bd891908c69c0ec62fd69" }, "downloads": -1, "filename": "mediafire-0.4.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "69ec4e473743c085de2117a86f11db80", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 24641, "upload_time": "2015-05-23T03:28:46", "url": "https://files.pythonhosted.org/packages/86/06/51a125633651a05ee575a30c10aaca47d71a1757555ac632db4367179cd9/mediafire-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "120e476b11da82bf7c0ffb50fa342d2a", "sha256": "5069b9eb317a8a671e8af20c0667087f0306d28a4c1a60cf465fca2f2dab8fdc" }, "downloads": -1, "filename": "mediafire-0.4.1.tar.gz", "has_sig": true, "md5_digest": "120e476b11da82bf7c0ffb50fa342d2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22788, "upload_time": "2015-05-23T03:28:42", "url": "https://files.pythonhosted.org/packages/d4/43/bca4c7c30079fb7dbb0128922e381d9faadb8bd8231d4e51a98f4dbfbde7/mediafire-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "1881963e249d40e4b08862e8dd542b65", "sha256": "c6b68e021da1f7e5bc84c2fc898eb897545843ab72a98fe72d1f8f06bf989eaa" }, "downloads": -1, "filename": "mediafire-0.5.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "1881963e249d40e4b08862e8dd542b65", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 26719, "upload_time": "2016-01-09T13:37:09", "url": "https://files.pythonhosted.org/packages/6f/81/b27615726d86e2a6305cbb3d086406efec85025c4ae1f81f39b9c6723558/mediafire-0.5.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b5487cc965eadf0b527e77e0fa6e9187", "sha256": "a9045e0cd18a2a266715fb8d55439ca0529c3247f0be56c9874dc81f941bfb92" }, "downloads": -1, "filename": "mediafire-0.5.0.tar.gz", "has_sig": true, "md5_digest": "b5487cc965eadf0b527e77e0fa6e9187", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25070, "upload_time": "2016-01-09T13:37:14", "url": "https://files.pythonhosted.org/packages/6f/c8/e426e769a28b8fd4263a7e52141085bcf64e5d14e32c6b967eb51861fb2d/mediafire-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "1a4abf6843f52d381f97ab52d729389e", "sha256": "a3a959460993183381b3803f436ec1a509f24da6706d4841447ee926ed1247cb" }, "downloads": -1, "filename": "mediafire-0.5.1-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "1a4abf6843f52d381f97ab52d729389e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27412, "upload_time": "2016-01-14T01:20:27", "url": "https://files.pythonhosted.org/packages/af/c7/300a3340197b1b15942739fc9c70ea6b11d5cc903e0dea9d6aa19790b6a2/mediafire-0.5.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1e07b6ed235ce5e25a55e6c33b9361cb", "sha256": "ad4d36ff0bc49f7dd78be84a4f9fba08ef2c0f4cda829fadaab1521fb958fc51" }, "downloads": -1, "filename": "mediafire-0.5.1.tar.gz", "has_sig": true, "md5_digest": "1e07b6ed235ce5e25a55e6c33b9361cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25740, "upload_time": "2016-01-14T01:20:58", "url": "https://files.pythonhosted.org/packages/3f/9a/8d11068512640529076103a6b4af75968d43f3e1b6ee79d2ed9bc1d88dfa/mediafire-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "5669ced57e0de7e41287b8ab12a15a89", "sha256": "bc17ccad6dbdf809409617b751d585da05152888ba2a7794e6828093b6a9a2e0" }, "downloads": -1, "filename": "mediafire-0.5.2-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "5669ced57e0de7e41287b8ab12a15a89", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 27509, "upload_time": "2016-01-31T22:22:40", "url": "https://files.pythonhosted.org/packages/a2/c1/a1ba860da64f5db8e5ae1ddf25f96beca30c3ef8a75c6fb8d462bc992ecc/mediafire-0.5.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "64ff8878536b212aca049e1346d9ea4e", "sha256": "8f52a61075e15f39d01e838e26d44200843421732d5528a9571f4d7275e4886e" }, "downloads": -1, "filename": "mediafire-0.5.2.tar.gz", "has_sig": true, "md5_digest": "64ff8878536b212aca049e1346d9ea4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25876, "upload_time": "2016-01-31T22:22:45", "url": "https://files.pythonhosted.org/packages/93/0c/04688a3186c9f960c7cacb5279154a81859c990531d41a0d604f0669ac47/mediafire-0.5.2.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "132a51a0d2e257afac504267cb5bb003", "sha256": "b63e5d990cbe6e6fbf4e805a6c48591387ff3c7566077c398a0aa5f66de23751" }, "downloads": -1, "filename": "mediafire-0.6.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "132a51a0d2e257afac504267cb5bb003", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25887, "upload_time": "2016-11-16T03:28:20", "url": "https://files.pythonhosted.org/packages/ab/47/e97dbc5c5cc3030d71159e26cb0120b7b6eff3776380a8b499fb8206fa0b/mediafire-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dc2309dc8967dbe6f5046f306438aa09", "sha256": "d9182785856b858b8d7896740f0dbb012856a81e00132812bffbf0e344884d6b" }, "downloads": -1, "filename": "mediafire-0.6.0.tar.gz", "has_sig": true, "md5_digest": "dc2309dc8967dbe6f5046f306438aa09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21415, "upload_time": "2016-11-16T03:28:23", "url": "https://files.pythonhosted.org/packages/76/33/6d6afe605253de4395329ea6480e51486241e7feb7b0c111fbc5ad0254f8/mediafire-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "132a51a0d2e257afac504267cb5bb003", "sha256": "b63e5d990cbe6e6fbf4e805a6c48591387ff3c7566077c398a0aa5f66de23751" }, "downloads": -1, "filename": "mediafire-0.6.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "132a51a0d2e257afac504267cb5bb003", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 25887, "upload_time": "2016-11-16T03:28:20", "url": "https://files.pythonhosted.org/packages/ab/47/e97dbc5c5cc3030d71159e26cb0120b7b6eff3776380a8b499fb8206fa0b/mediafire-0.6.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "dc2309dc8967dbe6f5046f306438aa09", "sha256": "d9182785856b858b8d7896740f0dbb012856a81e00132812bffbf0e344884d6b" }, "downloads": -1, "filename": "mediafire-0.6.0.tar.gz", "has_sig": true, "md5_digest": "dc2309dc8967dbe6f5046f306438aa09", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21415, "upload_time": "2016-11-16T03:28:23", "url": "https://files.pythonhosted.org/packages/76/33/6d6afe605253de4395329ea6480e51486241e7feb7b0c111fbc5ad0254f8/mediafire-0.6.0.tar.gz" } ] }