{ "info": { "author": "Reinoud van Leeuwen", "author_email": "reinoud.v@n.leeuwen.net", "bugtrack_url": null, "classifiers": [], "description": "====\nfactuursturen\n====\n\nThe factuursturen package is a client for the dutch webservice www.factuursturen.nl API.\n\nTo be able to use the API, you will need an API key. You can get one with these steps:\n* log in on http://www.factuursturen.nl\n* click 'Instellingen'\n* click 'Verbindingen'\n* click 'Maak API Sleutel'\n\nAPI documentation can be found at http://www.factuursturen.nl/docs/api_v0_beta.pdf (or there might be a newer version\npresent at the moment you read this)\n\nSynopsis\n========\nTypical usage is something like this:\n\n #!/usr/bin/env python\n import factuursturen\n\n username = 'foo'\n apikey = 'some_long_string'\n\n\n fact = factuursturen.Client(apikey, username)\n\n clients = fact.get('clients')\n\n new_product = {'code': 'Productcode',\n 'name': 'Name of this product',\n 'price': 123.45,\n 'taxes': 21}\n try:\n fact.post('products', data)\n except FactuursturenWrongPostvalue as errormessage:\n print \"oops! {errormessage}\".format(errormessage=errormessage)\n\n invoices = fact.get('invoices')\n\n for invoice in invoices:\n invoicenr = invoice[u'invoicenr']\n try:\n pdf = fact.get('invoices_pdf', invoicenr)\n\n filename = '/tmp/{invoicenr}.pdf'.format(invoicenr=invoicenr)\n with open(filename, 'w') as f:\n f.write(pdf)\n print \"{} written\".format(filename)\n except factuursturenEmptyResult:\n print \"factuur {invoicenr} is empty\".format(invoicenr=invoicenr)\n\nInstallation:\n=============\nEither:\n\n * type this command:\n sudo pip install factuursturen\n\nor:\n * download source\n * extract\n * cd into directory containing setup.py\n * type this command\n python setup.py install\n\n\nChanges from the API documentation\n==================================\nThis client is pythonic, so some things are translated:\n- booleans are returned as true booleans (not as strings with 'true')\n- nested dictionaries can be used in posting (will be flattened automatically)\n- returned dicts are the same structure as a dict that can be used for posting\n\nExamples\n========\n\nInitialisation\n--------------\nYou can either pass username and apikey when instantiating an object:\n\n import factuursturen\n username = 'foo'\n apikey = 'some_long_string'\n fact = factuursturen.Client(apikey, username)\n\nor create a file named .factuursturen_rc in the current directory or your home directory like this:\n\n [default]\n username = foo\n apikey = some_long_string\n\n(note: no quotes!), and create the object without explicitely passing them:\n\n import factuursturen\n fact = factuursturen.Client()\n\n\ncreate a product\n----------------\n\n import factuursturen\n fact = factuursturen.Client()\n new_product = {'code': 'Productcode',\n 'name': 'Name of this product',\n 'price': 123.45,\n 'taxes': 21}\n try:\n fact.post('products', new_product)\n except factuursturen.FactuursturenWrongPostvalue as errormessage:\n print \"oops! {errormessage}\".format(errormessage=errormessage)\n\ncreate a client\n---------------\n\n client = {'contact' : 'John Doe',\n 'showcontact' : True,\n 'company' : 'Johnny Bravo Inc.',\n 'address' : 'Sir John Road 100',\n 'zipcode' : '1337 JB',\n 'city' : 'Johnsville',\n 'country' : 146,\n 'phone' : '010 123 4567',\n 'mobile' : '0612 34 56 78',\n 'email' : 'johnny@bravo.com',\n 'bankcode' : '123456789',\n 'taxnumber' : 'NL001234567B01',\n 'tax_shifted' : False,\n 'sendmethod' : 'email',\n 'paymentmethod' : 'bank',\n 'top' : 3,\n 'stddiscount' : 5.30,\n 'mailintro' : 'Dear Johnny,',\n 'reference' : {'line1': 'Your ref: ABC123',\n 'line2': 'Our ref: XZX0029/2932/001',\n 'line3': 'Thank you for your order'},\n 'notes' : 'This client is always late with his payments',\n 'notes_on_invoice' : False\n }\n\n try:\n clientid = fact.post('clients', client)\n print \"client added with id {id}\".format(id=clientid)\n except factuursturen.FactuursturenError as errormessage:\n print \"oops! {errormessage}\".format(errormessage=errormessage)\n\nsend an invoice to a client\n---------------------------", "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/reinoud/factuursturen", "keywords": null, "license": "Copyright (c) 2013, Reinoud van Leeuwen\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n\n - Redistributions of source code must retain the above copyright notice, \n this list of conditions and the following disclaimer.\n\n - Redistributions in binary form must reproduce the above copyright notice,\n this list of conditions and the following disclaimer in the documentation \n and/or other materials provided with the distribution.\n\n \nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND \nANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED \nWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE \nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE \nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL \nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR \nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER \nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, \nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.", "maintainer": null, "maintainer_email": null, "name": "factuursturen", "package_url": "https://pypi.org/project/factuursturen/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/factuursturen/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/reinoud/factuursturen" }, "release_url": "https://pypi.org/project/factuursturen/0.4/", "requires_dist": null, "requires_python": null, "summary": "a REST client class for the API of www.factuursturen.nl", "version": "0.4" }, "last_serial": 833777, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5ce07bab9127b312ff38290d7b63e447", "sha256": "e46fec03ca13632be875ff542b68fb986c49d17e223611f3e825a026a9944e9a" }, "downloads": -1, "filename": "factuursturen-0.1.tar.gz", "has_sig": false, "md5_digest": "5ce07bab9127b312ff38290d7b63e447", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4831, "upload_time": "2013-07-07T16:37:48", "url": "https://files.pythonhosted.org/packages/a2/3a/40491f2d1d7a39bd9ffd6e7e7afa640289d03312a13a2f96796659d42d83/factuursturen-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "3abff8e3580d4fa49bb95354b72d69a8", "sha256": "27124a6f1e5a09ea0253f05ee8d66192b782088079d17736db682489f78079b9" }, "downloads": -1, "filename": "factuursturen-0.2.tar.gz", "has_sig": false, "md5_digest": "3abff8e3580d4fa49bb95354b72d69a8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7570, "upload_time": "2013-07-09T22:33:47", "url": "https://files.pythonhosted.org/packages/11/f2/132c52407d9034ba58f01c72a0afc4de2d08ce7472dc491a6139bc2b9898/factuursturen-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "d0eb447148e34f7db774876814d31af4", "sha256": "a6e3ec6785a0278ae7c03fb7fc2dc88af9ae53d0ea98d1436136094852a0bc82" }, "downloads": -1, "filename": "factuursturen-0.3.tar.gz", "has_sig": false, "md5_digest": "d0eb447148e34f7db774876814d31af4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8764, "upload_time": "2013-07-10T21:37:20", "url": "https://files.pythonhosted.org/packages/d5/d9/1faab87197f720753760d9f3943195872907179373ee30ff7d2a8742b53f/factuursturen-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "7c87747f0974b81869795a3e381aa510", "sha256": "d6d630a524f83940ffdd49185fbf598b53d669b79e4163ad578b3f3003e48409" }, "downloads": -1, "filename": "factuursturen-0.4.tar.gz", "has_sig": false, "md5_digest": "7c87747f0974b81869795a3e381aa510", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9708, "upload_time": "2013-08-06T19:58:31", "url": "https://files.pythonhosted.org/packages/6e/1c/fc50dc297afd51b1b3359826e36130e988451867d766338e3eb658f931e0/factuursturen-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7c87747f0974b81869795a3e381aa510", "sha256": "d6d630a524f83940ffdd49185fbf598b53d669b79e4163ad578b3f3003e48409" }, "downloads": -1, "filename": "factuursturen-0.4.tar.gz", "has_sig": false, "md5_digest": "7c87747f0974b81869795a3e381aa510", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9708, "upload_time": "2013-08-06T19:58:31", "url": "https://files.pythonhosted.org/packages/6e/1c/fc50dc297afd51b1b3359826e36130e988451867d766338e3eb658f931e0/factuursturen-0.4.tar.gz" } ] }