{ "info": { "author": "Tobin Brown", "author_email": "tobin@brobin.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Information Technology", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "========\nUSPS API\n========\n\n|python| |coverage| |license|\n\n-------------------\n\nThis is a simple Python wrapper for the USPS API. Instead of having to deal with XML, use this library and receive nicely formatted JSON back while tracking shipments, creating shipments, and validating addresses.\n\n------------\nInstallation\n------------\n\nTo install usps-api, use pip::\n\n pip install usps-api\n\nOr to install from source::\n\n python setup.py install\n\n-------------\nConfiguration\n-------------\n\nNote: In order to use any of these APIs, you need to register with USPS and get a `USERID` https://www.usps.com/business/web-tools-apis/welcome.htm. For the create_shipment endpoint, you will also need to request further permissions by emailing uspstechnicalsupport@mailps.custhelp.com about Label API access.\n\n-----\nUsage\n-----\n\n\nTrack Shipments\n---------------\n\n.. code-block:: python\n\n from usps import USPSApi\n\n usps = USPSApi('XXXXXXXXXXXX')\n track = usps.track('00000000000000000000')\n print(track.result)\n\n\nCreate Shipment\n---------------\n\nThe `create_shipment` function needs a to and crom address, weight (in ounces), service type and label type. Service types and lable types can be found in `usps/constants.py`. Defaults are `SERVICE_PRIORITY` and `LABEL_ZPL`.\n\n.. code-block:: python\n\n from usps import USPSApi, Address\n from usps import SERVICE_PRIORITY, LABEL_ZPL\n\n to_address = Address(\n name='Tobin Brown',\n address_1='1234 Test Ave.',\n city='Test',\n state='NE',\n zipcode='55555'\n )\n\n from_address = Address(\n name='Tobin Brown',\n address_1='1234 Test Ave.',\n city='Test',\n state='NE',\n zipcode='55555'\n )\n weight = 12 # weight in ounces\n\n usps = USPSApi('XXXXXXXXXXXX', test=True)\n label = usps.create_label(to_address, from_address, weight, SERVICE_PRIORITY, LABEL_ZPL)\n print(label.result)\n\nValidate Address\n----------------\n\n.. code-block:: python\n\n from usps import USPSApi, Address\n\n address = Address(\n name='Tobin Brown',\n address_1='1234 Test Ave.',\n city='Test',\n state='NE',\n zipcode='55555'\n )\n usps = USPSApi('XXXXXXXXXXXX', test=True)\n validation = usps.validate_address(address)\n print(validation.result)\n\n------- \nLicense\n-------\n\nMIT. See `LICENSE`_ for more details.\n\n\n.. _LICENSE: https://github.com/Brobin/usps-api/blob/master/LICENSE\n\n.. |license| image:: https://img.shields.io/github/license/Brobin/django-seed.svg?style=flat-square\n :target: https://github.com/Brobin/django-seed/blob/master/LICENSE\n :alt: MIT License\n\n.. |coverage| image:: https://coveralls.io/repos/github/Brobin/usps-api/badge.svg?branch=master\n :target: https://coveralls.io/github/Brobin/usps-api?branch=master\n :alt: Code Coverage\n\n.. |python| image:: https://img.shields.io/pypi/pyversions/usps-api.svg?style=flat-square\n :target: https://pypi.python.org/pypi/usps-api\n :alt: Python 2.7, 3.4, 3.5, 3.6\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/brobin/usps-api", "keywords": "usps shipping", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "usps-api", "package_url": "https://pypi.org/project/usps-api/", "platform": "", "project_url": "https://pypi.org/project/usps-api/", "project_urls": { "Homepage": "http://github.com/brobin/usps-api" }, "release_url": "https://pypi.org/project/usps-api/0.3/", "requires_dist": [ "requests", "lxml", "xmltodict" ], "requires_python": "", "summary": "Python wrapper for the USPS API", "version": "0.3" }, "last_serial": 4783464, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6648d0f6875869cf7f26ff345c72bc84", "sha256": "3048dd8e5dca815201829f619fca1ff3710092bd5e6456ed5f3fb3c9f7eac1f4" }, "downloads": -1, "filename": "usps_api-0.1-py3.5.egg", "has_sig": false, "md5_digest": "6648d0f6875869cf7f26ff345c72bc84", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 7818, "upload_time": "2018-10-09T14:50:07", "url": "https://files.pythonhosted.org/packages/bb/8b/4c923a638f4abf16a59ca0d8b999f02a7f945055fd9b9099242e8e502dcd/usps_api-0.1-py3.5.egg" }, { "comment_text": "", "digests": { "md5": "938968d2a4eb4727eaeded94e1148484", "sha256": "799f1149cba98a1e48154afecedcf7497afdcf1bb661476d07a4e1553052c1cf" }, "downloads": -1, "filename": "usps-api-0.1.tar.gz", "has_sig": false, "md5_digest": "938968d2a4eb4727eaeded94e1148484", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3951, "upload_time": "2018-10-09T14:50:09", "url": "https://files.pythonhosted.org/packages/a0/d3/a3c81e0bf70df752526a48a88376e957f98353a9014f549e331adfefef95/usps-api-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "7c6058ff49e31ab426577a64d3f6c43a", "sha256": "7343158cbab02164f2262f0e7d6962b3e2e96dd198f73c98416e7dcbe4602a5e" }, "downloads": -1, "filename": "usps-api-0.2.tar.gz", "has_sig": false, "md5_digest": "7c6058ff49e31ab426577a64d3f6c43a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4591, "upload_time": "2018-10-09T15:36:28", "url": "https://files.pythonhosted.org/packages/23/29/02618ebd92fce09d0b6b75177587882a4ad1bab82e42ce066df8e8f9f725/usps-api-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "42a5e16bc60cdff32cf78cae820fbfb5", "sha256": "25f280691ca34ff8de6872ab3dddcca2035ea74f48e27d4574593ca90aa36817" }, "downloads": -1, "filename": "usps_api-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "42a5e16bc60cdff32cf78cae820fbfb5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6461, "upload_time": "2019-02-05T19:01:19", "url": "https://files.pythonhosted.org/packages/d8/67/5b52e60528417ad8d76655cd808df3d368c5f79e313b5dcd2da5c1fb151a/usps_api-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acf4fab1ff00e8c8d0920fed88eb5829", "sha256": "70973f6c952fcf2760374ad9718199b780e8fca81fb1677c6971bb7412750c8c" }, "downloads": -1, "filename": "usps-api-0.3.tar.gz", "has_sig": false, "md5_digest": "acf4fab1ff00e8c8d0920fed88eb5829", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4874, "upload_time": "2019-02-05T19:01:21", "url": "https://files.pythonhosted.org/packages/dd/88/1b3dc193b4c69851cfe6bf008509da2c0e27bf24c0fa93bc88558e226255/usps-api-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42a5e16bc60cdff32cf78cae820fbfb5", "sha256": "25f280691ca34ff8de6872ab3dddcca2035ea74f48e27d4574593ca90aa36817" }, "downloads": -1, "filename": "usps_api-0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "42a5e16bc60cdff32cf78cae820fbfb5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6461, "upload_time": "2019-02-05T19:01:19", "url": "https://files.pythonhosted.org/packages/d8/67/5b52e60528417ad8d76655cd808df3d368c5f79e313b5dcd2da5c1fb151a/usps_api-0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "acf4fab1ff00e8c8d0920fed88eb5829", "sha256": "70973f6c952fcf2760374ad9718199b780e8fca81fb1677c6971bb7412750c8c" }, "downloads": -1, "filename": "usps-api-0.3.tar.gz", "has_sig": false, "md5_digest": "acf4fab1ff00e8c8d0920fed88eb5829", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4874, "upload_time": "2019-02-05T19:01:21", "url": "https://files.pythonhosted.org/packages/dd/88/1b3dc193b4c69851cfe6bf008509da2c0e27bf24c0fa93bc88558e226255/usps-api-0.3.tar.gz" } ] }