{ "info": { "author": "Florent Clairambault", "author_email": "florent@habx.fr", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", "Topic :: Multimedia :: Graphics :: 3D Modeling", "Topic :: Multimedia :: Graphics :: 3D Rendering", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# Sketchfab API Client\n\n## Getting started\nInstall the module:\n```sh\npip3 install sketchfab\n```\n\n### Using the CLI\n```sh\nSKETCHFAB_API_TOKEN=XXXX sketchfab upload -f my_file.zip\n```\n\n### Using the lib\nThis code creates a directory for each of your collection and places all models inside it.\n```python\nimport os\nimport sketchfab\n\nsfc = sketchfab.Client('YOUR-API-KEY')\nfor c in sfc.collections():\n print(\"Collection:\", c)\n col_dir = os.path.join(\"download\", c.name)\n os.makedirs(col_dir, exist_ok=True)\n for m in c.models():\n model_dir = os.path.join(col_dir, m.name)\n print(f\" Model: {m.name} ({model_dir})\")\n if not os.path.exists(model_dir):\n os.rename(m.download_to_dir(), model_dir)\n```\nWhich will give you something like that:\n```text\nCollection: Collection{empty collection}\nCollection: Collection{housing-updates}\n Model: tableKitchen80x200 (download/housing-updates/tableKitchen80x200)\n Model: kitchenModSink120x65x210 (download/housing-updates/kitchenModSink120x65x210)\n Model: kitchenModSink60x65x90 (download/housing-updates/kitchenModSink60x65x90)\n Model: kitchenModFridge60x65x210 (download/housing-updates/kitchenModFridge60x65x210)\n Model: kitchenModCorner65x65x210 (download/housing-updates/kitchenModCorner65x65x210)\n Model: kitchenModBasic10x65x90 (download/housing-updates/kitchenModBasic10x65x90)\n Model: kitchenModWasher60x65x210 (download/housing-updates/kitchenModWasher60x65x210)\n Model: kitchenModSink60x65x210 (download/housing-updates/kitchenModSink60x65x210)\n Model: kitchenModBasic20x65x210 (download/housing-updates/kitchenModBasic20x65x210)\n Model: washbasin120x60 (download/housing-updates/washbasin120x60)\n Model: kitchenModWasher60x65x90 (download/housing-updates/kitchenModWasher60x65x90)\n Model: bedDouble140x200-2 (download/housing-updates/bedDouble140x200-2)\n Model: simpleBed90x200 (download/housing-updates/simpleBed90x200)\n Model: wcFloor70x40 (download/housing-updates/wcFloor70x40)\n Model: kitchenModBasic60x65x90 (download/housing-updates/kitchenModBasic60x65x90)\n Model: kitchenModDishWasher60x65x90 (download/housing-updates/kitchenModDishWasher60x65x90)\n Model: kitchenModSink120x65x90 (download/housing-updates/kitchenModSink120x65x90)\n Model: kitchenModStove60x65x210 (download/housing-updates/kitchenModStove60x65x210)\n Model: kitchenModStove60x65x90 (download/housing-updates/kitchenModStove60x65x90)\n Model: washbasin60x60 (download/housing-updates/washbasin60x60)\n Model: tableKitchen80x140 (download/housing-updates/tableKitchen80x140)\n Model: shower90x90 (download/housing-updates/shower90x90)\n Model: kitchenModDishWasher60x65x210 (download/housing-updates/kitchenModDishWasher60x65x210)\n Model: kitchenModBasic10x65x210 (download/housing-updates/kitchenModBasic10x65x210)\n\n```\n\n### Using docker\n```\n$ docker run -e SKETCHFAB_API_TOKEN=XXXXX -ti habx/sketchfab list_collections\nCollections are:\n2019-10-20 21:12:24,417 Starting new HTTPS connection (1): api.sketchfab.com:443\n2019-10-20 21:12:24,762 https://api.sketchfab.com:443 \"GET /v3/me/collections HTTP/1.1\" 200 None\n- Collection 1\n- Collection 2\n```\n\n## Why\n- I couldn't find one\n- The [sample codes from the sketchfab website](https://sketchfab.com/developers/data-api/v3/python) are pretty much unuseable\n\n## Choices\n- The API is designed to be as simple as possible to use\n\n## Known issues\n- The code might not be the most elegant. I'm definitely interested by any feedback you can provide me on that.\n- The official swagger-based documentation is not respecting the API behavior. As such you might find that:\n - The library enforces some strange rules (like passing a model when creating a model)\n - The library doesn't properly use the API (like listing the models of a collection through search)\n\n In both case it was by trial and error that I discovered how to use the API. If you find better ways to do\n it I'm interested.\n- The listing doesn't work with long lists (it needs to be re-implemented as an iterable calling the listing API)\n- The CLI is pretty much useless at this stage\n\n## Missing APIs\nYou can submit pull-requests or ask me to implement any feature that you need and might be missing.\n\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/habx/lib-py-sketchfab", "keywords": "sketchfab 3d-model client-library development", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sketchfab", "package_url": "https://pypi.org/project/sketchfab/", "platform": "", "project_url": "https://pypi.org/project/sketchfab/", "project_urls": { "Bug Reports": "https://github.com/habx/lib-py-sketchfab/issues", "Homepage": "https://github.com/habx/lib-py-sketchfab", "Source": "https://github.com/habx/lib-py-sketchfab" }, "release_url": "https://pypi.org/project/sketchfab/0.0.8/", "requires_dist": [ "requests (==2.22.0)", "urllib3", "pdoc3 ; extra == 'dev'" ], "requires_python": ">=3.7", "summary": "Sketchfab client", "version": "0.0.8", "yanked": false, "yanked_reason": null }, "last_serial": 6020723, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "2429652029defd367cbbd6609e3a395b", "sha256": "4a1d17f89230b19e5431708d3dca6350860facd2f207be434cc516c469139715" }, "downloads": -1, "filename": "sketchfab-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2429652029defd367cbbd6609e3a395b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4708, "upload_time": "2019-10-05T01:48:21", "upload_time_iso_8601": "2019-10-05T01:48:21.675918Z", "url": "https://files.pythonhosted.org/packages/87/87/3abceeb27acd65ef237a3e4e615da13852359ab780787a45a09852a7db98/sketchfab-0.0.1-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "7244e4883561b4356970048f5045b32a", "sha256": "3bb975a04ff5920a5d5ca9842f1fdd4c155e16f85f201cf05d1724138d829b3d" }, "downloads": -1, "filename": "sketchfab-0.0.1.tar.gz", "has_sig": false, "md5_digest": "7244e4883561b4356970048f5045b32a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3733, "upload_time": "2019-10-05T01:48:24", "upload_time_iso_8601": "2019-10-05T01:48:24.040758Z", "url": "https://files.pythonhosted.org/packages/45/7e/1658f0e24806f20690a98b5dd6a9df7d05eb058920efa7ba4df186512243/sketchfab-0.0.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "40b94456e50b50d2b050bd187614dbd5", "sha256": "0a2cfdfb53c00fd4542a22ad8dae62745e663b297cef89d1b1d8ec2a1e93a0df" }, "downloads": -1, "filename": "sketchfab-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "40b94456e50b50d2b050bd187614dbd5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 6820, "upload_time": "2019-10-05T16:16:25", "upload_time_iso_8601": "2019-10-05T16:16:25.712730Z", "url": "https://files.pythonhosted.org/packages/a7/ac/26b28582a903db1f114497c4c9a9d342e33757c1627b82ee5d6d9c4f87bf/sketchfab-0.0.2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "9004ebf6da2ea60f8ba9c37e7653618f", "sha256": "8e39dc2e1e0f0b7130b65affa842ece89d2eb228efe12cf33e215848a653e349" }, "downloads": -1, "filename": "sketchfab-0.0.2.tar.gz", "has_sig": false, "md5_digest": "9004ebf6da2ea60f8ba9c37e7653618f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 5777, "upload_time": "2019-10-05T16:16:27", "upload_time_iso_8601": "2019-10-05T16:16:27.267776Z", "url": "https://files.pythonhosted.org/packages/e0/b9/c8a1dc69a5ca35a9769a0bdcb0177170de39cf0fe61af5a1d90780facefe/sketchfab-0.0.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "58c6987aa9656e572f68bc03be612f4f", "sha256": "d58b0f2e29cff25d568be26001860c5e9a2186f59c7de6a5246db05b7b66c416" }, "downloads": -1, "filename": "sketchfab-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "58c6987aa9656e572f68bc03be612f4f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 7054, "upload_time": "2019-10-06T23:35:25", "upload_time_iso_8601": "2019-10-06T23:35:25.063245Z", "url": "https://files.pythonhosted.org/packages/2e/f9/605c05f81459cdd356dc53fe9183301e225994fcb6fc4be299a16ff03a36/sketchfab-0.0.3-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "832598d4513165b6fbe46929c1416ca3", "sha256": "9928faeaf347affb27756731a50dc67faa5a5b1c393ccae5243860a8a23d4888" }, "downloads": -1, "filename": "sketchfab-0.0.3.tar.gz", "has_sig": false, "md5_digest": "832598d4513165b6fbe46929c1416ca3", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 6074, "upload_time": "2019-10-06T23:35:26", "upload_time_iso_8601": "2019-10-06T23:35:26.746781Z", "url": "https://files.pythonhosted.org/packages/9d/17/037efd7c91436bf26cafbe4e897fc9f72b8eaceda731a7394f87e5cb9e20/sketchfab-0.0.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "dab2a0f23e8f472e64b740b281ce7a80", "sha256": "9128060c1f955f7a781f486f0c7845ec0cbdae100027eaf9118dd709a918964e" }, "downloads": -1, "filename": "sketchfab-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "dab2a0f23e8f472e64b740b281ce7a80", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 7951, "upload_time": "2019-10-17T16:57:08", "upload_time_iso_8601": "2019-10-17T16:57:08.028018Z", "url": "https://files.pythonhosted.org/packages/82/ac/08ec99a4fb66c1c9ea1cc1a37e71c1dec2ec400e9802c613b78dfd05c3ec/sketchfab-0.0.4-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "f353b8047cbfc718ed8ee2c5bf9baa9b", "sha256": "2e2ac1be76c5136bfd6433426d6a6cb7f22dc4b593023b4a8a8362bbda4bd29e" }, "downloads": -1, "filename": "sketchfab-0.0.4.tar.gz", "has_sig": false, "md5_digest": "f353b8047cbfc718ed8ee2c5bf9baa9b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 7403, "upload_time": "2019-10-17T16:57:10", "upload_time_iso_8601": "2019-10-17T16:57:10.037233Z", "url": "https://files.pythonhosted.org/packages/d1/fd/e41c28a5cd35ffe207b966f988438faca6a1ecc9a8b39c3077c01a10fced/sketchfab-0.0.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "a13915cc261abd0bd915e5501a80de7b", "sha256": "27c2e9a66d4275715c23bb5d4c4d239fd0221743911a2ef2a0b98486b326255d" }, "downloads": -1, "filename": "sketchfab-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "a13915cc261abd0bd915e5501a80de7b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 8498, "upload_time": "2019-10-20T21:14:50", "upload_time_iso_8601": "2019-10-20T21:14:50.458801Z", "url": "https://files.pythonhosted.org/packages/98/e0/42b031e5a9cd13d77e6321ef92f6d6ebffa058f4f26c5ab72e2c08b38359/sketchfab-0.0.5-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "14cf9a918e8bf3a5401f471ebc989513", "sha256": "82c0dac2c1e4c890dfc32853fc15be54a9b315d293070d3df08fa59ffdd6f54e" }, "downloads": -1, "filename": "sketchfab-0.0.5.tar.gz", "has_sig": false, "md5_digest": "14cf9a918e8bf3a5401f471ebc989513", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 7938, "upload_time": "2019-10-20T21:14:52", "upload_time_iso_8601": "2019-10-20T21:14:52.189577Z", "url": "https://files.pythonhosted.org/packages/70/9f/3231ccfe949886f75069bd1ca7bce2485954a48144ded40b2e4f802fbc3b/sketchfab-0.0.5.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "54d97f09e1ff6f33c4ca98c03508956a", "sha256": "cff1467df54b726b6c9b307360f1bce5f13d3f114d8c6a9bfbf90b8f9e3b42fd" }, "downloads": -1, "filename": "sketchfab-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "54d97f09e1ff6f33c4ca98c03508956a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 8849, "upload_time": "2019-10-21T16:19:10", "upload_time_iso_8601": "2019-10-21T16:19:10.972653Z", "url": "https://files.pythonhosted.org/packages/57/35/2f9c3f8f057472a9dcb2b56f46b134701e73df7fdd13073faf9817d67cc7/sketchfab-0.0.6-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "c2c5521507bf3b3b6777f9d73718bf4e", "sha256": "8a2293f7c109a4e5f58ac876f719474c14ddb517277784ab9a597fdede2bb86a" }, "downloads": -1, "filename": "sketchfab-0.0.6.tar.gz", "has_sig": false, "md5_digest": "c2c5521507bf3b3b6777f9d73718bf4e", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 9154, "upload_time": "2019-10-21T16:19:12", "upload_time_iso_8601": "2019-10-21T16:19:12.873997Z", "url": "https://files.pythonhosted.org/packages/fd/bd/d618849e8935e71ceebf886c6c1e352218a090c283eb04f6bffa45cf9849/sketchfab-0.0.6.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "5539905aa9e9699754c5878ee38d0776", "sha256": "da72f74b15c98b03df4dea1c1945512da1fc6671ee425d2693f83f23568ab4ef" }, "downloads": -1, "filename": "sketchfab-0.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "5539905aa9e9699754c5878ee38d0776", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 8999, "upload_time": "2019-10-23T14:57:47", "upload_time_iso_8601": "2019-10-23T14:57:47.275585Z", "url": "https://files.pythonhosted.org/packages/0a/f6/60f1c808378c5c232a9dc4b3f11d98319fde08f6186d3a2a82e7be0224a0/sketchfab-0.0.7-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "caadbe538c4ae5cec5cd926b48c855eb", "sha256": "421da1d99004b2ecf18a057b2e6d92fe6836e2a87fb11eccd25c4e2c52f4d326" }, "downloads": -1, "filename": "sketchfab-0.0.7.tar.gz", "has_sig": false, "md5_digest": "caadbe538c4ae5cec5cd926b48c855eb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 9341, "upload_time": "2019-10-23T14:57:48", "upload_time_iso_8601": "2019-10-23T14:57:48.769754Z", "url": "https://files.pythonhosted.org/packages/87/93/4915859df71ebda97af14caeaf1bb7051407c1619a7a36628aecf300e67d/sketchfab-0.0.7.tar.gz", "yanked": false, "yanked_reason": null } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "da5d435e3bd2211a0aa9a72d559f335c", "sha256": "8c0fecd6ae27cf38631521687301912c61a05fb2d63e9e17ef2c3397e711586d" }, "downloads": -1, "filename": "sketchfab-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "da5d435e3bd2211a0aa9a72d559f335c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 9000, "upload_time": "2019-10-23T22:14:48", "upload_time_iso_8601": "2019-10-23T22:14:48.506173Z", "url": "https://files.pythonhosted.org/packages/2e/23/8f15a241220aa56e55c7f696a4317442a6b24cda236a22eef688fa94536c/sketchfab-0.0.8-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "860029395d185f405c9542b572904bd7", "sha256": "69c7601444f3324efc6e4b3ee971fa3547d6a48420d1cc007f4f7f3e271769bc" }, "downloads": -1, "filename": "sketchfab-0.0.8.tar.gz", "has_sig": false, "md5_digest": "860029395d185f405c9542b572904bd7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 9338, "upload_time": "2019-10-23T22:14:50", "upload_time_iso_8601": "2019-10-23T22:14:50.243880Z", "url": "https://files.pythonhosted.org/packages/dc/e3/17e4485ba0f2ed6c4596a21006269487ed8cb391a58c94302460f32c0dcf/sketchfab-0.0.8.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "da5d435e3bd2211a0aa9a72d559f335c", "sha256": "8c0fecd6ae27cf38631521687301912c61a05fb2d63e9e17ef2c3397e711586d" }, "downloads": -1, "filename": "sketchfab-0.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "da5d435e3bd2211a0aa9a72d559f335c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 9000, "upload_time": "2019-10-23T22:14:48", "upload_time_iso_8601": "2019-10-23T22:14:48.506173Z", "url": "https://files.pythonhosted.org/packages/2e/23/8f15a241220aa56e55c7f696a4317442a6b24cda236a22eef688fa94536c/sketchfab-0.0.8-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "860029395d185f405c9542b572904bd7", "sha256": "69c7601444f3324efc6e4b3ee971fa3547d6a48420d1cc007f4f7f3e271769bc" }, "downloads": -1, "filename": "sketchfab-0.0.8.tar.gz", "has_sig": false, "md5_digest": "860029395d185f405c9542b572904bd7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 9338, "upload_time": "2019-10-23T22:14:50", "upload_time_iso_8601": "2019-10-23T22:14:50.243880Z", "url": "https://files.pythonhosted.org/packages/dc/e3/17e4485ba0f2ed6c4596a21006269487ed8cb391a58c94302460f32c0dcf/sketchfab-0.0.8.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }