{ "info": { "author": "Bernard `Guyzmo` Pratz", "author_email": "pyoctopart@m0g.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved", "Operating System :: Unix" ], "description": "pyoctopart\n==========\n\nA simple Python client frontend to the Octopart public REST API.\n\nFor detailed API documentation, refer to the `Octopart APIv2\ndocumentation `_\n\nThis is a fork of `Joe\nBaker `_'s work, and\nthis fork is *incompatible* with Python 2 distributions!\n\nYou'll find the sources of this project over\nhttps://github.com/guyzmo/pyoctopart\n\nUsage\n-----\n\nInstall\n~~~~~~~\n\njust do:\n\n::\n\n python3 setup.py install\n\nand it'll be available from your python REPL:\n\n::\n\n % python3\n >>> from pyoctopart.octopart import Octopart\n >>> o = Octopart.api(apikey=\"yourapikey\")\n\nwhen the lib will be considered stable enough, I'll upload it to\n`pipy `_:\n\n::\n\n % pip install pyoctopart\n\nDevelop\n~~~~~~~\n\nif you just want to develop, you can do:\n\n::\n\n % buildout\n\nwhich will download dependencies and deploy a python command in\n``bin/``:\n\n::\n\n % bin/python3\n >>> from pyoctopart.octopart import Octopart\n >>> o = Octopart.api(apikey=\"yourapikey\")\n\nYou can run regression tests using:\n\n::\n\n % bin/test\n\nNotes\n-----\n\nAPI v3 conversion\n~~~~~~~~~~~~~~~~~\n\nAt the time being only three methods have been switched to the new API:\n\n::\n\n parts_search()\n parts_match()\n parts_get()\n\nAnd the tests will need to be updated. Those methods are the only one\nbeing used in the ```pyparts`` `_\nproject, though.\n\nmethod/argument syntax (for API v3)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nA number of arguments in the v3 API are using syntax that are not\ncompatible with python's syntax, such as ``include[]=datasheets``. To\nenforce argument's type checking and stay compatible with the API, the\narguments are converted as booleans replacing the assignment with an\nunderscore, making it ``include_datasheets``, so for the ``Part`` model\nyou have the following matches:\n\nincludes\n~~~~~~~~\n\n::\n\n include_short_description \u2192 include[]=short_description\n include_datasheets \u2192 include[]=datasheets\n include_compliance_documents \u2192 include[]=compliante_documents\n include_descriptions \u2192 include[]=descriptions\n include_imagesets \u2192 include[]=imagesets\n include_specs \u2192 include[]=specs\n include_category_uids \u2192 include[]=category_uids\n include_external_links \u2192 include[]=external_links\n include_reference_designs \u2192 include[]=reference_designs\n include_cad_models \u2192 include[]=cad_models\n\nShows\n~~~~~\n\n::\n\n show_uid \u2192 show[]=uid\n show_mpn \u2192 show[]=mpn\n show_manufacturer \u2192 show[]=manufacturer\n show_brand \u2192 show[]=brand\n show_octopart_url \u2192 show[]=octopart_url\n show_offers \u2192 show[]=offers\n show_broker_listings \u2192 show[]=broker_listings\n show_short_description \u2192 show[]=short_description\n show_datasheets \u2192 show[]=datasheets\n show_compliance_documents \u2192 show[]=compliante_documents\n show_descriptions \u2192 show[]=descriptions\n show_imagesets \u2192 show[]=imagesets\n show_specs \u2192 show[]=specs\n show_category_uids \u2192 show[]=category_uids\n show_external_links \u2192 show[]=external_links\n show_reference_designs \u2192 show[]=reference_designs\n show_cad_models \u2192 show[]=cad_models\n\nHides\n~~~~~\n\n::\n\n hide_uid \u2192 hide[]=uid\n hide_mpn \u2192 hide[]=mpn\n hide_manufacturer \u2192 hide[]=manufacturer\n hide_brand \u2192 hide[]=brand\n hide_octopart_url \u2192 hide[]=octopart_url\n hide_offers \u2192 hide[]=offers\n hide_broker_listings \u2192 hide[]=broker_listings\n hide_short_description \u2192 hide[]=short_description\n hide_datasheets \u2192 hide[]=datasheets\n hide_compliance_documents \u2192 hide[]=compliante_documents\n hide_descriptions \u2192 hide[]=descriptions\n hide_imagesets \u2192 hide[]=imagesets\n hide_specs \u2192 hide[]=specs\n hide_category_uids \u2192 hide[]=category_uids\n hide_external_links \u2192 hide[]=external_links\n hide_reference_designs \u2192 hide[]=reference_designs\n hide_cad_models \u2192 hide[]=cad_models\n\nAs a reference, check the `include/show/hide directives sections of the\nmanual `_.\n\nmethod/argument syntax (for API v2)\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThere are a number of arguments in the Octopart API documentation which\ncontain periods in their names. When passing these arguments from\nPython, substitute an underscore for any periods.\n\nSimilarly, substitute underscores for backslashes in method names.\n\nFor example:\n\n::\n\n >>> o = Octopart()\n >>> o.parts_get(1881614252472, optimize.hide_datasheets=True)\n SyntaxError: keyword can't be an expression\n\n Instead, pass the argument as:\n >>> o.parts_get(1881614252472, optimize_hide_datasheets=True)\n\nThe library will perform the translation internally.\n\nRoadmap\n~~~~~~~\n\n- [x] switch to python 3\n- [x] create buildout build\n- [x] use function annotations\n- [o] switch to v3 API\n- [ ] improve and fix tests\n\nAuthors\n-------\n\n- Forked by Bernard ``Guyzmo`` Pratz\n- Originally authored by Joe Baker\n\nLicense\n-------\n\n::\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.", "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/guyzmo/pyoctopart", "keywords": "download tv show", "license": "GPLv3", "maintainer": null, "maintainer_email": null, "name": "pyoctopart", "package_url": "https://pypi.org/project/pyoctopart/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pyoctopart/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/guyzmo/pyoctopart" }, "release_url": "https://pypi.org/project/pyoctopart/0.6.3/", "requires_dist": null, "requires_python": null, "summary": "Python library to connect to Octopart", "version": "0.6.3" }, "last_serial": 2013077, "releases": { "0.6.0": [ { "comment_text": "", "digests": { "md5": "fc2eaebac83dd9f0e87f7099dc24985b", "sha256": "43a12d2c8e28b472e249b5a4d34875525ef5fcbb782ff34b7f71ed865b5460c5" }, "downloads": -1, "filename": "pyoctopart-0.6.0-py3.4.egg", "has_sig": false, "md5_digest": "fc2eaebac83dd9f0e87f7099dc24985b", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 22112, "upload_time": "2015-03-07T10:57:50", "url": "https://files.pythonhosted.org/packages/ed/72/46bd27c3f05fc85d3536742e9524372034afa77035e33ee1fde3b1b17bf6/pyoctopart-0.6.0-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "2e143a44907a194caa0660ca497dcd54", "sha256": "d000b548feb51bd981c69bf107212782fc6bacdecbda86d8f231f98c4fbb0ac3" }, "downloads": -1, "filename": "pyoctopart-0.6.0.tar.gz", "has_sig": false, "md5_digest": "2e143a44907a194caa0660ca497dcd54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10667, "upload_time": "2015-03-07T10:57:53", "url": "https://files.pythonhosted.org/packages/74/05/668410b8c27939d56a045752aa4e5aa56121ba98921dc29cfffc11d5944e/pyoctopart-0.6.0.tar.gz" } ], "0.6.1": [], "0.6.2": [], "0.6.3": [ { "comment_text": "", "digests": { "md5": "df3359c4c3c7460f72a847f9d710d202", "sha256": "b4d689f9451e942cded964cf43282da5d5437856263a84bfa5d2ff748682975d" }, "downloads": -1, "filename": "pyoctopart-0.6.3-py3.5.egg", "has_sig": false, "md5_digest": "df3359c4c3c7460f72a847f9d710d202", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 24082, "upload_time": "2016-03-17T20:51:41", "url": "https://files.pythonhosted.org/packages/3c/ad/1d0d6a7edff0664c808e274e2c672017a7f5c49b02f68395f2f3e6cd1a8b/pyoctopart-0.6.3-py3.5.egg" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "df3359c4c3c7460f72a847f9d710d202", "sha256": "b4d689f9451e942cded964cf43282da5d5437856263a84bfa5d2ff748682975d" }, "downloads": -1, "filename": "pyoctopart-0.6.3-py3.5.egg", "has_sig": false, "md5_digest": "df3359c4c3c7460f72a847f9d710d202", "packagetype": "bdist_egg", "python_version": "3.5", "requires_python": null, "size": 24082, "upload_time": "2016-03-17T20:51:41", "url": "https://files.pythonhosted.org/packages/3c/ad/1d0d6a7edff0664c808e274e2c672017a7f5c49b02f68395f2f3e6cd1a8b/pyoctopart-0.6.3-py3.5.egg" } ] }