{ "info": { "author": "Andres Buritica", "author_email": "andres@thelinuxkid.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5" ], "description": "======\npyusps\n======\n\nDescription\n===========\n\npyusps is a pythonic wrapper for the USPS Ecommerce APIs.\nCurrently, only the Address Information API is supported.\n\nInstallation\n============\n\nInstall using pip::\n\n pip install pyusps\n\nor easy_install::\n\n easy_install pyusps\n\nAddress Information API\n=======================\n\nThis API is avaiable via the pyusps.address_information.verify\nfunction. It takes in the user ID given to you by the USPS\nand a variable length list of addresses to verify.\n\nRequests\n--------\n\nEach address is a dict containing the following required keys:\n\n :address: The street address\n :city: The city\n :state: The state\n :zip_code: The zip code in one the following formats: xxxxx, xxxxx-xxxx, or xxxxxxxxx\n\n*Only one of state or zip_code is needed.*\n\nThe following keys are optional:\n\n :firm_name: The company name, e.g., XYZ Corp. Although the API documentation says this field is required, tests show that it isn't.\n :address_extended: An apartment, suite number, etc\n :urbanization: For Puerto Rico addresses only\n\n\n\nResponses\n---------\n\nThe response will either be a dict, if a single address was requested,\nor a list of dicts, if multiple addresses were requested. Each address\nwill always contain the following keys:\n\n :address: The street address\n :city: The city\n :state: The state\n :zip5: The first five numbers of the zip code\n :zip4: The last four numbers of the zip code\n\n\nEach address can optionally contain the following keys:\n\n :firm_name: The company name, e.g., XYZ Corp.\n :address_extended: An apartment, suite number, etc\n :urbanization: For Puerto Rico addresses only\n :returntext: Additional information about the address, usually a warning, e.g., \"The address you entered was found but more information is needed (such as an apartment, suite, or box number) to match to a specific address.\"\n\n*firm_name, address_extended and urbanization will return the value\nrequested if the API does not find a match.*\n\nFor multiple addresses, the order in which the addresses\nwere specified in the request is preserved in the response.\n\nErrors\n------\n\nA ValueError will be raised if there's a general error, e.g.,\ninvalid user id, or if a single address request generates an error.\nExcept for a general error, multiple addresses requests do not raise errors.\nInstead, if one of the addresses generates an error, the\nValueError object is returned along with the rest of the results.\n\n\nExamples\n--------\n\nSingle address request::\n\n from pyusps import address_information\n\n addr = dict([\n ('address', '6406 Ivy Lane'),\n ('city', 'Greenbelt'),\n ('state', 'MD'),\n ])\n address_information.verify('foo_id', addr)\n dict([\n ('address', '6406 IVY LN'),\n ('city', 'GREENBELT'),\n ('state', 'MD'),\n ('zip5', '20770'),\n ('zip4', '1441'),\n ])\n\nMutiple addresses request::\n\n from pyusps import address_information\n\n addrs = [\n dict([\n ('address', '6406 Ivy Lane'),\n ('city', 'Greenbelt'),\n ('state', 'MD'),\n ]),\n dict([\n ('address', '8 Wildwood Drive'),\n ('city', 'Old Lyme'),\n ('state', 'CT'),\n ]),\n ]\n address_information.verify('foo_id', *addrs)\n [\n dict([\n ('address', '6406 IVY LN'),\n ('city', 'GREENBELT'),\n ('state', 'MD'),\n ('zip5', '20770'),\n ('zip4', '1441'),\n ]),\n dict([\n ('address', '8 WILDWOOD DR'),\n ('city', 'OLD LYME'),\n ('state', 'CT'),\n ('zip5', '06371'),\n ('zip4', '1844'),\n ]),\n ]\n\nMutiple addresses error::\n\n from pyusps import address_information\n\n addrs = [\n dict([\n ('address', '6406 Ivy Lane'),\n ('city', 'Greenbelt'),\n ('state', 'MD'),\n ]),\n dict([\n ('address', '8 Wildwood Drive'),\n ('city', 'Old Lyme'),\n ('state', 'NJ'),\n ]),\n ]\n address_information.verify('foo_id', *addrs)\n [\n dict([\n ('address', '6406 IVY LN'),\n ('city', 'GREENBELT'),\n ('state', 'MD'),\n ('zip5', '20770'),\n ('zip4', '1441'),\n ]),\n ValueError('-2147219400: Invalid City. '),\n ]\n\nReference\n---------\nFor more information on the Address Information API visit https://www.usps.com/business/web-tools-apis/address-information-api.htm\n\nDeveloping\n==========\n\nExternal dependencies\n---------------------\n\n - libxml2-dev\n - libxslt1-dev\n - build-essential\n - python-dev or python3-dev\n - python-setuptools or python3-setuptools\n - python-virtualenv\n\nSetup\n-----\n\nTo start developing run the following commands from the project's base\ndirectory. You can download the source from\nhttps://github.com/thelinuxkid/pyusps::\n\n # I like to install the virtual environment in a hidden repo.\n virtualenv .virtual\n # I leave the magic to Ruby developers (.virtual/bin/activate)\n .virtual/bin/python setup.py develop\n # At this point, pyusps will already be in easy-install.pth.\n # So, pip will not attempt to download it\n .virtual/bin/pip install pyusps[test]\n\nIf you like to use ipython you can install it with the dev\nrequirement::\n\n .virtual/bin/pip install pyusps[dev]\n\nTesting\n-------\n\nTo run the unit-tests run the following command from the project's\nbase directory::\n\n .virtual/bin/nosetests\n\n\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/pyusps/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/thelinuxkid/pyusps", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyusps", "package_url": "https://pypi.org/project/pyusps/", "platform": "", "project_url": "https://pypi.org/project/pyusps/", "project_urls": { "Homepage": "https://github.com/thelinuxkid/pyusps" }, "release_url": "https://pypi.org/project/pyusps/0.0.7/", "requires_dist": [ "setuptools (>=0.6c11)", "lxml (>=2.3.3)", "ipython (>=0.12.1); extra == 'dev'", "fudge (>=1.0.3); extra == 'test'", "nose (>=1.1.2); extra == 'test'" ], "requires_python": "", "summary": "pyusps -- Python bindings for the USPS Ecommerce APIs", "version": "0.0.7" }, "last_serial": 3512813, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "05372f7cfa4a3c7f226aa04851ede106", "sha256": "2f6037792977d002c05aa558053382234fe341f4cf92722c8e444d5439b0b3b7" }, "downloads": -1, "filename": "pyusps-0.0.1.tar.gz", "has_sig": false, "md5_digest": "05372f7cfa4a3c7f226aa04851ede106", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4823, "upload_time": "2012-04-26T02:14:56", "url": "https://files.pythonhosted.org/packages/e4/47/0d23fcce4cfbcefb09586f504769bbb7074fb70873bc10a70a802c0b185d/pyusps-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "7b64e183c88174e3e695551caeeeeb49", "sha256": "cdad741b5aef6ab67eaa0114f4e28b6c3047f34b47b47d51480efea4758ff29e" }, "downloads": -1, "filename": "pyusps-0.0.2.tar.gz", "has_sig": false, "md5_digest": "7b64e183c88174e3e695551caeeeeb49", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4864, "upload_time": "2012-10-11T21:37:01", "url": "https://files.pythonhosted.org/packages/3f/8d/2d26aad90bb101470832731d299e6cd42f8031126b5448b2f43422e8bd4d/pyusps-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "70dffb2ec744481dcb0c6e7f51bec5ef", "sha256": "495de91b3b1e58344bafef3229703320cee120bbeffdf5cf0d80c66c0345acb0" }, "downloads": -1, "filename": "pyusps-0.0.3.tar.gz", "has_sig": false, "md5_digest": "70dffb2ec744481dcb0c6e7f51bec5ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5063, "upload_time": "2012-10-20T04:03:02", "url": "https://files.pythonhosted.org/packages/25/fc/f526e3e0798077211a8511b6dfda725ecf847234db800fc5f2e0a7635991/pyusps-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c3c366a4572e82bb1354b1d57984b1bf", "sha256": "d0a9659ad8eff7ced4a3a59ffbb5e67b18e53e0675d37aceae6603d5343f7977" }, "downloads": -1, "filename": "pyusps-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c3c366a4572e82bb1354b1d57984b1bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6704, "upload_time": "2012-10-20T06:05:14", "url": "https://files.pythonhosted.org/packages/f1/ce/4c5ac61a825cfb1828c36bfa5ec73e2aa08713f0eedabaf242ac2841312c/pyusps-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "d1a1fc100b88a68d641ee2f33a5d618f", "sha256": "77c877af7c59893197f17402d9da5156470ad87c2eef7d6e421ab290786a5524" }, "downloads": -1, "filename": "pyusps-0.0.5.tar.gz", "has_sig": false, "md5_digest": "d1a1fc100b88a68d641ee2f33a5d618f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8057, "upload_time": "2012-10-20T09:04:10", "url": "https://files.pythonhosted.org/packages/7a/86/a00f3ce2648e34ed82459b1e79c2d632cbc46f9f95344617010afe86e842/pyusps-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d26aea0ff6413561ec79636806552f1f", "sha256": "e78b86a8d6f53482c6e6e63bc918ba7b335ec3d480893c9f9b2eedace735968c" }, "downloads": -1, "filename": "pyusps-0.0.6.tar.gz", "has_sig": false, "md5_digest": "d26aea0ff6413561ec79636806552f1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7947, "upload_time": "2012-10-29T20:53:08", "url": "https://files.pythonhosted.org/packages/e9/10/9874bda80c6495fc9bf053c680350165cd32f9fa0107a68734e97013f991/pyusps-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "075cd2b067d593df8776018f16700e01", "sha256": "9cd0c06441754ec0d0e6aea6c8731e5a16045d0fc08119c242f91503a1c298e0" }, "downloads": -1, "filename": "pyusps-0.0.7-py2-none-any.whl", "has_sig": false, "md5_digest": "075cd2b067d593df8776018f16700e01", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11199, "upload_time": "2018-01-23T01:53:09", "url": "https://files.pythonhosted.org/packages/6b/79/ede8ee32cf9f83ec6313ab7ef7e9cb0f075e363664dfcb0c63a23a7deee8/pyusps-0.0.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4739c8a16a2dbd50d67e9a5dbfd72488", "sha256": "973ca7255e33db84eee1d52521db4c8e9431d15ad5ce7069d65486627f8e8be7" }, "downloads": -1, "filename": "pyusps-0.0.7.tar.gz", "has_sig": false, "md5_digest": "4739c8a16a2dbd50d67e9a5dbfd72488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8013, "upload_time": "2018-01-23T01:53:10", "url": "https://files.pythonhosted.org/packages/94/75/f8f93013c40267175674aabcb384ac22945835900e427a66cccb164f3a46/pyusps-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "075cd2b067d593df8776018f16700e01", "sha256": "9cd0c06441754ec0d0e6aea6c8731e5a16045d0fc08119c242f91503a1c298e0" }, "downloads": -1, "filename": "pyusps-0.0.7-py2-none-any.whl", "has_sig": false, "md5_digest": "075cd2b067d593df8776018f16700e01", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 11199, "upload_time": "2018-01-23T01:53:09", "url": "https://files.pythonhosted.org/packages/6b/79/ede8ee32cf9f83ec6313ab7ef7e9cb0f075e363664dfcb0c63a23a7deee8/pyusps-0.0.7-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4739c8a16a2dbd50d67e9a5dbfd72488", "sha256": "973ca7255e33db84eee1d52521db4c8e9431d15ad5ce7069d65486627f8e8be7" }, "downloads": -1, "filename": "pyusps-0.0.7.tar.gz", "has_sig": false, "md5_digest": "4739c8a16a2dbd50d67e9a5dbfd72488", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8013, "upload_time": "2018-01-23T01:53:10", "url": "https://files.pythonhosted.org/packages/94/75/f8f93013c40267175674aabcb384ac22945835900e427a66cccb164f3a46/pyusps-0.0.7.tar.gz" } ] }