{ "info": { "author": "Juho Kolehmainen", "author_email": "juho.kolehmainen@iki.fi", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Synology PhotoStation Python API\n================================\n\nA Python API to communicate with `Photo Station `_ running on Synology NAS. Photos and videos are uploaded directly to PhotoStation through its Web API with various metadata including ratings, title, description, and GPS coordinates.\n\nThis module uploads original files and lets Synology to process the required thumbnail versions. This works fine with Synology DS916+ but might be too slow with models having slower processors.\n\nSupported features:\n\n* Login to your shared or personal Photo Station\n* List album contents\n* Create missing albums automatically\n* Add new photos\n* Update metadata of existing photos\n* Update photo binaries based if either timestamp or filesize differs\n* Delete photos\n\nTested with Synology DS916+ running DSM 6.1 and Photo Station 6.7.1. Should work with older versions too but you mileage may vary.\n\nInstallation\n------------\n\n::\n\n pip install photostation\n\nUsage\n-----\n\n::\n\n from photostation import PhotoStationService, SynologyException\n import requests\n\n try:\n # login to Photo Station and set up root album\n service = PhotoStationService('https://USERNAME:PASSWORD@xyz.synology.me/photo/webapi/', 'root-album')\n\n # get reference to album and create it if missing\n album = service.album('2017/05/13', create=True)\n\n # list album content (subalbums, photos, videos)\n print(album.items)\n\n # add photo reference inside album\n photo = album.create_item(\n filename = 'testimage.jpg', # original filename\n filetype = 'photo', # photo or video \n created = 1494603121336, # timestamp of photo capture\n modified = 1494603121336 # optional timestamp to compare if existing binary has changed\n filesize = 1000, # optional filesize to compare if existing binary has changed\n title = '', # optional title\n description = '', # optional description\n rating = 0, # optional starts from 0 to 5\n latitude = 60, # optional coordinates for videos\n longitude = 20) # optional coordinates for videos\n\n # update metadata of existing photos\n merged = photo.merge()\n\n if merged:\n print('metadata was updated or already up to date, deleting photo')\n\n photo.delete()\n else:\n # upload new file\n stream = requests.get('https://dummyimage.com/600x400/000/fff', stream=True)\n photo.save_content(stream)\n\n except SynologyException as se:\n print se.value\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/skarppi/python-photostation", "keywords": "synology dsm photo station web api", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "photostation", "package_url": "https://pypi.org/project/photostation/", "platform": "", "project_url": "https://pypi.org/project/photostation/", "project_urls": { "Homepage": "https://github.com/skarppi/python-photostation" }, "release_url": "https://pypi.org/project/photostation/0.1.5/", "requires_dist": null, "requires_python": "", "summary": "A Python API to communicate with Photo Station running on Synology NAS.", "version": "0.1.5" }, "last_serial": 3177323, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b9642833d9e7f3d5b3b3569e7e4feab0", "sha256": "d79acd6eba124fc87d53333da8a32918d497e09d9685b72b5537fdf638de4675" }, "downloads": -1, "filename": "photostation-0.1.0.tar.gz", "has_sig": false, "md5_digest": "b9642833d9e7f3d5b3b3569e7e4feab0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6244, "upload_time": "2017-05-14T16:56:38", "url": "https://files.pythonhosted.org/packages/ae/b5/a824c77dd5c581f887ce6c98cdbe85fbd59bf05d67ff1f18996201ceda0f/photostation-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "48eb062e7cef140bd831ad8e9440d855", "sha256": "7a0431ab9c263c7a7cee8635c77f1b4f1274dbb7071234186c33e1d31324b1a7" }, "downloads": -1, "filename": "photostation-0.1.1.tar.gz", "has_sig": false, "md5_digest": "48eb062e7cef140bd831ad8e9440d855", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6695, "upload_time": "2017-07-01T22:48:23", "url": "https://files.pythonhosted.org/packages/c4/eb/9cb49db5efd52f2cb159b711d32b3edabcaee4c31199923f1bff8c4bf511/photostation-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6d636270b68144e0a85b9e7476c55439", "sha256": "2e1d437c7fe234387b8ffedcdc4f79b4bc129711b0761959b52d0be12aa3d53d" }, "downloads": -1, "filename": "photostation-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6d636270b68144e0a85b9e7476c55439", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6768, "upload_time": "2017-08-10T17:33:04", "url": "https://files.pythonhosted.org/packages/73/db/e66a61e67e8d7e14260e906ae0138dc824b30dd8cc2e456c50f283f94032/photostation-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "2bc39f2c5dbd275c9e96c2e70e8e3635", "sha256": "737a7329381e1275cb9c40fdb9e26cb072dbc79a74f38068aae568d86e109d0e" }, "downloads": -1, "filename": "photostation-0.1.3.tar.gz", "has_sig": false, "md5_digest": "2bc39f2c5dbd275c9e96c2e70e8e3635", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7078, "upload_time": "2017-08-11T23:57:05", "url": "https://files.pythonhosted.org/packages/5c/be/fec84631c7736158b918dbef6fd8be35eef8c3ed9355a14249448434724b/photostation-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "2d5678b1a5ca9d1fd5e25113c4397d7a", "sha256": "72176a0654bb281dea15c0f7ca3d5db1308c5833a7616beb96b77e063bf99e89" }, "downloads": -1, "filename": "photostation-0.1.4.tar.gz", "has_sig": false, "md5_digest": "2d5678b1a5ca9d1fd5e25113c4397d7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7100, "upload_time": "2017-08-17T20:19:40", "url": "https://files.pythonhosted.org/packages/4f/f4/4fcd6a1aa921792540bcacc35adb81d5eecf393785d2c406267127d4ed7b/photostation-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "bcdb74b9d4eef584cdf02a806325821a", "sha256": "3653f272f63488321c0310d0a290f59d4468a98d117c521e174ce801fe5947dc" }, "downloads": -1, "filename": "photostation-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bcdb74b9d4eef584cdf02a806325821a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7901, "upload_time": "2017-09-15T19:34:14", "url": "https://files.pythonhosted.org/packages/65/e7/c619e2e79371ddf1cde348e8fef7cc49ed252efe3e93d5f04d1484625213/photostation-0.1.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bcdb74b9d4eef584cdf02a806325821a", "sha256": "3653f272f63488321c0310d0a290f59d4468a98d117c521e174ce801fe5947dc" }, "downloads": -1, "filename": "photostation-0.1.5.tar.gz", "has_sig": false, "md5_digest": "bcdb74b9d4eef584cdf02a806325821a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7901, "upload_time": "2017-09-15T19:34:14", "url": "https://files.pythonhosted.org/packages/65/e7/c619e2e79371ddf1cde348e8fef7cc49ed252efe3e93d5f04d1484625213/photostation-0.1.5.tar.gz" } ] }