{ "info": { "author": "Justin Quick", "author_email": "justquick@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.3", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.5", "Topic :: Artistic Software", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Multimedia", "Topic :: Multimedia :: Graphics", "Topic :: Scientific/Engineering :: Visualization", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "################################################################################\n# GChartWrapper - v0.9\n# Copyright (C) 2009 Justin Quick \n#\n# This program is free software. See attached LICENSE.txt for more info\n################################################################################\n\nGChartWrapper - Google Chart API Wrapper\n\nThe wrapper can render the URL of the Google chart based on your parameters.\nWith the chart you can render an HTML img tag to insert into webpages on the fly, \nshow it directly in a webbrowser, or save the chart PNG to disk.\n\n################################################################################\n\nChangelog:\n-- 0.9 --\nSwitched to New BSD License\n\n\n-- 0.8 --\nReverse functionality\n\t>>> G = GChart.fromurl('http://chart.apis.google.com/chart?ch...')\n\t\nChaining fixes\nRestuctured Axes functions\nCentralized and added unittests\nEnhanced unicode support\nDemos pages w/ source code\n\n-- 0.7 --\nFull py3k compliance\nColor name lookup from the css names: http://www.w3schools.com/css/css_colornames.asp\n\t>>> G = Pie3D(range(1,5))\n\t>>> G.color('green')\nNew charts Note,Text,Pin,Bubble\nUpdated Django templatetags to allow context inclusion and new charts\nAdded some more templating examples\n\n-- 0.6 --\nThe wrapper now supports chaining\n\tThe old way:\n\t>>> G = Pie3D(range(1,5))\n\t>>> G.label('A','B','C','D')\n\t>>> G.color('00dd00')\n\t>>> print G\nThe new way with chaining\n\t>>> print Pie3D(range(1,5)).label('A','B','C','D').color('00dd00')\nNew chart PieC for concentric pie charts\n\n################################################################################\n\n\nDoc TOC:\n 1.1 General\n 1.2 Constructing\n 1.3 Rendering and Viewing\n 2.1 Django extension\n 2.2 Static data\n 2.3 Dynamic data\n\t3.1 Other Templating Langs\n 4.1 Test framework\n 5.1 API documentation\n\n1.1 General \n\nCustomizable charts can be generated using the Google Chart API available\nat http://code.google.com/apis/chart/. The GChart Wrapper allows Pythonic access\nto the parameters of constructing the charts and displaying the URLs generated.\n\n1.2 Constructing \n\nclass GChart(Dict):\n \"\"\"Main chart class\n\n Chart type must be valid for cht parameter\n Dataset can be any python iterable and be multi dimensional\n Kwargs will be put into chart API params if valid\"\"\"\n def __init__(self, ctype=None, dataset=[], **kwargs):\n\nThe chart takes any iterable python data type (now including numpy arrays)\nand does the encoding for you\n\n # Datasets \n >>> dataset = (1, 2, 3)\n # Also 2 dimensional\n >>> dataset = [[3,4], [5,6], [7,8]]\n\nInitialize the chart with a valid type (see API reference) and dataset\n\n # 3D Piechart\n >>> GChart('p3', dataset)\n \n\n # Encoding (simple/text/extended)\n >>> G = GChart('p3', dataset, encoding='text')\n\n # maxValue (for encoding values)\n >>> G = GChart('p3', dataset, maxValue=100)\n\n # Size\n >>> G = GChart('p3', dataset, size=(300,150))\n\n # OR directly pass in API parameters\n >>> G = GChart('p3', dataset, chtt='My Cool Chart', chl='A|B|C')\n\n\n1.3 Rendering and Viewing \n\nThe wrapper has many useful ways to take the URL of your chart and output it \ninto different formats like...\n\n # As the chart URL itself using __str__\n >>> str(G)\n 'http://chart.apis.google.com/chart?...'\n\n\n # As an HTML tag, kw arguments can be valid tag attributes\n >>> G.img(height=500,id=\"chart\")\n '\"\"'\n\n\n # Save chart to a file as PNG image, returns filename\n >>> G.save('my-cool-chart')\n 'my-cool-chart.png'\n\n # Now fetch the PngImageFile using the PIL module for manipulation\n >>> G.image()\n \n\n # Now that you have the image instance, the world is your oyster\n # Try saving image as JPEG,GIF,etc.\n >>> G.image().save('my-cool-chart.jpg','JPEG')\n\n # Show URL directly in default web browser\n >>> G.show()\n\n\n\n2.1 Django Extension \n\nNewer versions of the wrapper contain templatetags for generating charts in\nDjango templates. This allows for dynamic insertion of data for viewing on any\nweb application. Install the module first using `python setup.py install` then \nplace 'GChartWrapper.charts' in your INSTALLED_APPS and then you are ready to go.\nJust include the '{% load charts %}' tag in your templates before making charts.\nIn the templating folder there is a folder called djangoproj which is an example\nDjango project to get you started.\n\n2.2 Static data\n\nThen try out some static data in your templates\n\n{% chart Line GurMrabsClgubaolGvzCrgrefOrnhgvshyvforggregunahtyl %}\n {% title 'The Zen of Python' 00cc00 36 %}\n {% color 00cc00 %}\n{% endchart %} \nOr try a bubble\n{% bubble icon_text_big snack bb $2.99 ffbb00 black as img %}\n\n2.3 Dynamic data\n\nThe module supports dynamic insertion of any variable within the context like so\n\n# View code\ndef example(request):\n return render_to_response('example.html',{'dataset':range(50)})\n \n# example.html template code \n{% chart Line dataset %}\n {% color 00cc00 %}\n{% endchart %} \n\nLook to example.html in the djangoproj for more detailed examples\n\n3.1 Other Templating Languages\n\nOther examples of using the chartwrapper in templating languages\nCurrently under development\n\n\tCheetah - done\n\tMako - done\n\tJinja2 - working, gonna b rough\n\tGenshi?\n\tAirspeed?\n\tMore to come...\n\n4.1 Test framework\n\nThe module also comes with a test framework with sample charts available in\nGChartWrapper/testing.py. The tests are executed through GChartWrapper/tests.py\n\nUsage\n\n $ python tests.py []\n\nWhere mode is one of the following:\n\n unit - Runs unit test cases for all charts to see if checksums match\n save - Saves images of all charts in 'tests' folder\n demo - Creates html demo pages (needs pygments)\n url - Prints urls of all charts [default]\n\n5.1 API Documentation \n\nThe Epydoc API information is generated in HTML format and available in the \ndocs folder under index.html", "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/appknox/google-chartwrapper", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "ak-gchartwrapper", "package_url": "https://pypi.org/project/ak-gchartwrapper/", "platform": "Windows,Linux,Solaris,Mac OS-X,Unix", "project_url": "https://pypi.org/project/ak-gchartwrapper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/appknox/google-chartwrapper" }, "release_url": "https://pypi.org/project/ak-gchartwrapper/0.9.1/", "requires_dist": null, "requires_python": null, "summary": "Python Google Chart Wrapper", "version": "0.9.1" }, "last_serial": 3153321, "releases": { "0.9.1": [ { "comment_text": "", "digests": { "md5": "50977125932033d06e35f4743eab5528", "sha256": "f539043c6814418ce361c59e86988c012d25d9fbb6d7fd15ebfc3187b420c2ca" }, "downloads": -1, "filename": "ak-gchartwrapper-0.9.1.tar.gz", "has_sig": false, "md5_digest": "50977125932033d06e35f4743eab5528", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26532, "upload_time": "2016-02-23T04:08:29", "url": "https://files.pythonhosted.org/packages/36/61/404b5148298f23f2458bdbb81d82735ba55d7036bfe5d30b20657430e1ad/ak-gchartwrapper-0.9.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "50977125932033d06e35f4743eab5528", "sha256": "f539043c6814418ce361c59e86988c012d25d9fbb6d7fd15ebfc3187b420c2ca" }, "downloads": -1, "filename": "ak-gchartwrapper-0.9.1.tar.gz", "has_sig": false, "md5_digest": "50977125932033d06e35f4743eab5528", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26532, "upload_time": "2016-02-23T04:08:29", "url": "https://files.pythonhosted.org/packages/36/61/404b5148298f23f2458bdbb81d82735ba55d7036bfe5d30b20657430e1ad/ak-gchartwrapper-0.9.1.tar.gz" } ] }