{ "info": { "author": "Maximillian Dornseif", "author_email": "md@hudora.de", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python" ], "description": "h1. pyJasper\n\npyJasper is a set of python based tools to handle JasperReports.\nSince jasper reports is a Java application you need Java installed.\n\nJython (bundled with pyJasper) is used to access the JasperReports\nlibrary via HTTP. Your pure Python clients can transparently generate\nJasperReport Documents.\n\nSee \"StackOverflow\":http://stackoverflow.com/questions/458340/is-there-a-better-layout-language-than-html-for-printing/459352#459352 and \"this Blogposting\":http://blogs.23.nu/c0re/2008/07/antville-18473/ to understand what problem pyJasper is trying to solve.\n\nh2. Usage\n\nh3. Servlet Interface\n\nThe servlet keeps no state at all. You have to supply it with an XML datasource, an XPath expression for that datasource and the JRXML report design. You get back the generated PDF or an plain text error message. The respective data has to be submitted via the form variables 'xpath', 'design' and 'xmldata'.\n\nTo try it out you can use curl. E.g. do to pyjasper/backend and start the jetty servlet container (sh pyJasper-httpd.sh). Then use curl in another window to request rendering of a PDF.\n\n curl -X POST --form xpath=//lieferscheine/lieferschein \n --form design=@reports/Lieferschein.jrxml \n --form xmldata=@sample-xml/Lieferschein.xml \n http://localhost:8080/pyJasper/jasper.py > test.pdf\n\ntest.pdf should now contain a rendered PDF document.\n\nh3. Python interface\n\nYou are expected to subclass @pyjasper.JasperGenerator@ and call it's @generate_pdf()@ function. Usually you only have to overwrite the @__init__()@ and @generate_xml(self, ...)@ functions and use the the Python \"ElementTree\":http://docs.python.org/lib/module-xml.etree.ElementTree.html API to generate an xml-tree. E.g.\n\n class MyPDFGenerator(JasperGenerator):\n \"\"\"Jasper-Generator for Greetingcards\"\"\"\n def __init__(self):\n super(MovementGenerator, self).__init__()\n self.reportname = 'reports/Greeting.jrxml'\n self.xpath = '/greetings/greeting'\n self.root = ET.Element('gretings') \n \n def generate_xml(self, tobegreeted):\n \"\"\"Generates the XML File used by Jasperreports\"\"\"\n \n ET.SubElement(self.root, 'generator').text = __revision__\n for name in tobegreeted:\n xml_greeting = ET.SubElement(self.root, 'greeting')\n ET.SubElement(xml_greeting, \"greeting_to\").text = unicode(name)\n ET.SubElement(xml_greeting, \"greeting_from\").text = u\"Max\"\n return xmlroot\n\nNow you can use @MyPDFGenerator@ like this:\n\n generator = MyPDFGenerator()\n pdf = generator.generate(['nik', 'tobias', 'chris', 'daniel'])\n open('/tmp/greetingcard.pdf', 'w').write(pdf)\n\nThe Python client finds the URL of the Jasper Servlet by checking the @PYJASPER_SERVLET_URL@ environment variable. It this Variable is not set, a default value of @http://localhost:8080/pyJasper/jasper.py@ is used.\n\nh2. Installation\n\nGet it at the \"Python Cheeseshop\":http://pypi.python.org/pypi/pyJasper or at \"GitHub\":http://github.com/hudora/pyJasper\nTo install the Python client interface just execute @python setup.py install@ as administrator. This should install the requred dependency ([http://code.google.com/p/httplib2/ httplib2]) automatically. For the Server part there exist no automatic setup script. Just copy @pyjasper/backend/@ to a suitable location and start @pyJasper-httpd.sh@ I use Dan Bernsteins [http://cr.yp.to/daemontools/supervise.html supervise] tool for running the Jetty server.\n\n\nh2. History\n\n * *0.2.1** public release (Summer 2008)\n * *0.2** release based on Jetty/Servlets (late 2007)\n * *0.1.1** public release on hosted-projects.com\n * *0.1** release based on long running Java Process (late 2006)\n * *0.01* one Java process per document (2006)\n\nh2. Files\n\n* client.py - contains high-level Python functions for report generation. Should theoretically be able to work with report generators other than JasperReports. So far builds on JasperClient.py.\n* backend/ - contains tools to drive JasperReports and actually build reports. The backend was once based on XmlJasperInterface by Jonas Schwertfeger but hase benn moving away from it for some time.\n* backend/lib - JasperReports and Jython Java Libraries\n* reports - report source files (*.jrxml)\n* sample-xml - sample XML files to work with reports\n* sample-pdf - sample PDFs generated by using reports with sample XML\n\n\nh2. Links\n\n* \"JasperReports\":http://en.wikipedia.org/wiki/JasperReports\n* \"How to Integrate JasperReports with Ruby on Rails\":http://wiki.rubyonrails.org/rails/pages/howtointegratejasperreports\n* \"jasapp\":http://www.vmware.com/appliances/directory/311 a VMWare Virtuall Appliance providing a JasperReports Interface\n* http://geraldo.sourceforge.net/", "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/hudora/pyJasper", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pyJasper", "package_url": "https://pypi.org/project/pyJasper/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyJasper/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/hudora/pyJasper" }, "release_url": "https://pypi.org/project/pyJasper/0.41/", "requires_dist": null, "requires_python": null, "summary": "toolkit to access JasperReports from Python", "version": "0.41" }, "last_serial": 796908, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "078f8e15a77ea04d2606e7bce076157c", "sha256": "9a8849362c10927ae3a2978748758885682214f200fc43a89f38ab38eece742f" }, "downloads": -1, "filename": "pyJasper-0.3.tar.gz", "has_sig": false, "md5_digest": "078f8e15a77ea04d2606e7bce076157c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22841, "upload_time": "2010-01-10T00:29:45", "url": "https://files.pythonhosted.org/packages/36/4e/d53fe90860638e347b1cef38e4c1e01de45047a3fec68429c37178ef17a0/pyJasper-0.3.tar.gz" } ], "0.3p1": [ { "comment_text": "", "digests": { "md5": "3471a1d53969e7cfe5e4b30337da4182", "sha256": "bc1f049326e4855fe4d298a6c87bc959d4997d9f0fa06f81f8be6506996f8e2d" }, "downloads": -1, "filename": "pyJasper-0.3p1.tar.gz", "has_sig": false, "md5_digest": "3471a1d53969e7cfe5e4b30337da4182", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20979, "upload_time": "2010-01-31T20:38:06", "url": "https://files.pythonhosted.org/packages/b3/e8/b3bfbfaf72776722a98c0789d3697530de32764e8ba08a7c4acc39429e0c/pyJasper-0.3p1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "36715ab62d3ff034f01c6384f466383b", "sha256": "ebaf39d96043d99d7b00a9eaebd7e7bf31f03c51cc7166a8900d6a1a49975960" }, "downloads": -1, "filename": "pyJasper-0.4.tar.gz", "has_sig": false, "md5_digest": "36715ab62d3ff034f01c6384f466383b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20968, "upload_time": "2010-01-31T21:05:29", "url": "https://files.pythonhosted.org/packages/38/cd/b7c91c7c4256fbb5cda032cd4847060d78141b5f52270805e7aaa87dc3fc/pyJasper-0.4.tar.gz" } ], "0.41": [ { "comment_text": "", "digests": { "md5": "082343d75b2f4dc4a81c4fdb44fd68ae", "sha256": "a93dcbe9512dcf3375efb7b9dcbcd4503b37b722359399b5d4e8544486239f82" }, "downloads": -1, "filename": "pyJasper-0.41.tar.gz", "has_sig": false, "md5_digest": "082343d75b2f4dc4a81c4fdb44fd68ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21063, "upload_time": "2010-05-03T16:16:10", "url": "https://files.pythonhosted.org/packages/a7/e9/fd6ad28cd926a3019d6ef1c5dd50801d33a4c07f97112819ff496094686a/pyJasper-0.41.tar.gz" } ], "0.41b": [ { "comment_text": "", "digests": { "md5": "01d09aa95a788bab5530a7f8f7a83bd7", "sha256": "042ef5fab4c1ba2edd33114e9ba48e0e6ac6278ac332f16f9f4529c1516d716c" }, "downloads": -1, "filename": "pyJasper-0.41b.tar.gz", "has_sig": false, "md5_digest": "01d09aa95a788bab5530a7f8f7a83bd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21133, "upload_time": "2010-07-10T15:01:49", "url": "https://files.pythonhosted.org/packages/52/27/6cb436a5bb0b21874b9c61b136cc0b7260907bd19f38ac6982c8ef1d6db2/pyJasper-0.41b.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "082343d75b2f4dc4a81c4fdb44fd68ae", "sha256": "a93dcbe9512dcf3375efb7b9dcbcd4503b37b722359399b5d4e8544486239f82" }, "downloads": -1, "filename": "pyJasper-0.41.tar.gz", "has_sig": false, "md5_digest": "082343d75b2f4dc4a81c4fdb44fd68ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21063, "upload_time": "2010-05-03T16:16:10", "url": "https://files.pythonhosted.org/packages/a7/e9/fd6ad28cd926a3019d6ef1c5dd50801d33a4c07f97112819ff496094686a/pyJasper-0.41.tar.gz" } ] }