{ "info": { "author": "AndyPi", "author_email": "info@andypi.co.uk", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3" ], "description": "A Python API wrapper for Stannp by AndyPi\n=========================================\n\nWhat is Stannp?\n---------------\n\nStannp allows you to send snail mail via a web api. It includes\npostcards and letters. See stannp.com for more details.\n\nInstallation\n------------\n\n::\n\n pip install stannp\n\nExample Usage\n=============\n\nInitialisation\n--------------\n\nimport the module and create an instance with your Stannp API Key\n\n::\n\n from stannp import StannpClient\n STANNP_API_KEY=\"XXXXXXXXXXXX\"\n stannpinstance=StannpClient(STANNP_API_KEY)\n\nTest send a postcard and return the JSON repsonse\n-------------------------------------------------\n\n::\n\n # set recipient using a python dictionary\n recipient={'title': 'Mr', 'firstname':'Andy', 'lastname':'Pi', 'address1': 'My House', 'address2': 'My Town', 'city':My City', 'postcode': 'Postcode', 'country':'GB'} \n # Set the message text\n message=\"Hi Friend,\\n\\n This is a sample postcard using AndyPi's stannp-api wrapper for python\"\n # Creates the postcard (where test.jpg is the filename of the front of the card)\n card=stannpinstance.send_postcard(size=\"A6\", test=True, recipient=recipient, front=\"test.jpg\", back=None, message=message, signature=None)\n # Prints the JSON repsonse from the stannp server, including the URL of a PDF preview\n print card\n\nTest send a letter and return the PDF preview URL from the repsonse\n-------------------------------------------------------------------\n\n::\n\n # set recipient using a python dictionary\n recipient={'title': 'Mr', 'firstname':'Andy', 'lastname':'Pi', 'address1': 'My House', 'address2': 'My Town', 'city':My City', 'postcode': 'Postcode', 'country':'GB'} \n # Set the message text to be a PDF named test.pdf (note the first page will have the recipients address)\n letter=stannpinstance.send_letter(test=True, template=None, recipient=recipient, background=None, pages=\"test.pdf\", pdforhtml=\"pdf\")\n # print the URL of the preview PDF\n print letter['data']['pdf']\n\nOther\n-----\n\nPlease see the comments / doctrings in stannp.py to understand how to\nuse all the functions.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/andy-pi/stannp-api", "keywords": "stannp,postcard,letters,api,snail mail", "license": "GNU", "maintainer": "", "maintainer_email": "", "name": "stannp", "package_url": "https://pypi.org/project/stannp/", "platform": "", "project_url": "https://pypi.org/project/stannp/", "project_urls": { "Author": "https://andypi.co.uk/", "Homepage": "https://github.com/andy-pi/stannp-api", "Stannp API": "https://www.stannp.com/direct-mail-api" }, "release_url": "https://pypi.org/project/stannp/1.0.0/", "requires_dist": null, "requires_python": ">=3", "summary": "An API wrapper for Stannp, a service for sending snail mail via a web api, such as postcards and letters.", "version": "1.0.0" }, "last_serial": 3646263, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "1fab61a77666f9e416d3aa8f0eba04cc", "sha256": "4cdedd0572b40a2d83419a32c0ffced4b94e9fc6990a3caaed0f5105813ac218" }, "downloads": -1, "filename": "stannp-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1fab61a77666f9e416d3aa8f0eba04cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 4808, "upload_time": "2018-03-07T02:43:35", "url": "https://files.pythonhosted.org/packages/44/c6/31fab2c941950db9eaebb54377f6ab88b9f623c6a9fb6099c661387e0dbd/stannp-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1fab61a77666f9e416d3aa8f0eba04cc", "sha256": "4cdedd0572b40a2d83419a32c0ffced4b94e9fc6990a3caaed0f5105813ac218" }, "downloads": -1, "filename": "stannp-1.0.0.tar.gz", "has_sig": false, "md5_digest": "1fab61a77666f9e416d3aa8f0eba04cc", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3", "size": 4808, "upload_time": "2018-03-07T02:43:35", "url": "https://files.pythonhosted.org/packages/44/c6/31fab2c941950db9eaebb54377f6ab88b9f623c6a9fb6099c661387e0dbd/stannp-1.0.0.tar.gz" } ] }