{ "info": { "author": "Ben Olive", "author_email": "sionide21@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Topic :: Internet :: Proxy Servers", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Camo Client\r\n===========\r\n\r\n|Build Status| |Latest Version|\r\n\r\nA python client for Github's `Camo image proxy`_.\r\n\r\nInstallation\r\n------------\r\n\r\nThis package is available on pypi. Installation is as simple as:\r\n\r\n::\r\n\r\n pip install camo-client\r\n\r\nUsage\r\n-----\r\n\r\nFor individual urls\r\n~~~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n from camo import CamoClient\r\n\r\n\r\n client = CamoClient(\"https://mycamoinstance.com\", key=\"my camo key\")\r\n url = client.image_url(\"http://someothersite.com/path/to/image.png\")\r\n\r\nFor html snippets\r\n~~~~~~~~~~~~~~~~~\r\n\r\n.. code:: python\r\n\r\n from camo import CamoClient\r\n\r\n\r\n client = CamoClient(\"https://mycamoinstance.com\", key=\"my camo key\")\r\n html = \"\"\"\\\r\n

\r\n Here is a picture:\r\n \"It's\r\n

\r\n \"\"\"\r\n\r\n client.parse_html(html)\r\n\r\nFor Django\r\n~~~~~~~~~~\r\n\r\nThis doesn't directly ship with a django filter but you can simply add\r\nthe following snippet to you templatetags\r\n\r\n.. code:: python\r\n\r\n from camo import CamoClient\r\n from django import template\r\n from django.utils.safestring import mark_safe\r\n\r\n\r\n register = template.Library()\r\n\r\n\r\n @register.filter\r\n def proxy_images(text):\r\n client = CamoClient(settings.CAMO_URL, key=settings.CAMO_KEY)\r\n return client.parse_html(text)\r\n\r\nContributing\r\n------------\r\n\r\n1. Fork it\r\n2. Create your feature branch (``git checkout -b my-new-feature``)\r\n3. Ensure the tests pass (``nosetests``)\r\n4. Commit your changes (``git commit -am 'Add some feature'``)\r\n5. Push to the branch (``git push origin my-new-feature``)\r\n6. Create new Pull Request\r\n\r\n.. _Camo image proxy: https://github.com/atmos/camo\r\n\r\n.. |Build Status| image:: https://travis-ci.org/sionide21/camo-client.png\r\n :target: https://travis-ci.org/sionide21/camo-client\r\n.. |Latest Version| image:: https://pypip.in/v/camo-client/badge.png\r\n :target: https://pypi.python.org/pypi/camo-client/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sionide21/camo-client", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "camo-client", "package_url": "https://pypi.org/project/camo-client/", "platform": "all", "project_url": "https://pypi.org/project/camo-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sionide21/camo-client" }, "release_url": "https://pypi.org/project/camo-client/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "A python client for Github's Camo image proxy", "version": "0.1.0" }, "last_serial": 996550, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "78f14e8d9f2469f3a6d6572d37774fec", "sha256": "4aafec5410c7a3430e3b73788612df6023c082043a4d8dabe2000d2d26fab65a" }, "downloads": -1, "filename": "camo-client-0.0.1.tar.gz", "has_sig": false, "md5_digest": "78f14e8d9f2469f3a6d6572d37774fec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1295, "upload_time": "2014-02-10T17:03:40", "url": "https://files.pythonhosted.org/packages/9b/a1/16b23457a16e8eed970732c41775091e85e795416f742d720b7f9cea11e3/camo-client-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "bc181de4955d4330f1afa9e8ecf3002c", "sha256": "7692be9031d9060034fafb974a6b8fd6a6f5bc04b1caa885e9c5d028368f5dcc" }, "downloads": -1, "filename": "camo-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bc181de4955d4330f1afa9e8ecf3002c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1527, "upload_time": "2014-02-10T19:42:08", "url": "https://files.pythonhosted.org/packages/1c/7c/3a02b9fd1cf6e16f74cede3145a95f5da1bf2c8e6acb2417b451cf12baba/camo-client-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bc181de4955d4330f1afa9e8ecf3002c", "sha256": "7692be9031d9060034fafb974a6b8fd6a6f5bc04b1caa885e9c5d028368f5dcc" }, "downloads": -1, "filename": "camo-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bc181de4955d4330f1afa9e8ecf3002c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1527, "upload_time": "2014-02-10T19:42:08", "url": "https://files.pythonhosted.org/packages/1c/7c/3a02b9fd1cf6e16f74cede3145a95f5da1bf2c8e6acb2417b451cf12baba/camo-client-0.1.0.tar.gz" } ] }