Skip to content
This repository has been archived by the owner on Jan 20, 2024. It is now read-only.

Commit

Permalink
Fix support for Python 3.6.
Browse files Browse the repository at this point in the history
  • Loading branch information
skarppi committed Sep 15, 2017
1 parent 541b7b4 commit c310748
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Synology PhotoStation Python API

A Python API to communicate with `Photo Station <https://www.synology.com/en-global/dsm/6.1/packages/PhotoStation>`_ 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.

This module uploads only 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.
This 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.

Supported features:

Expand Down
4 changes: 2 additions & 2 deletions photostation/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
from photostation import PhotoStationService
from error import SynologyException
from photostation.service import PhotoStationService
from photostation.error import SynologyException
2 changes: 1 addition & 1 deletion photostation/error.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,4 @@ def __init__(self, code):
if code in self.API_ERROR:
self.value = self.API_ERROR[code]
else:
self.value = 'Unknown error from API (%d)' % code
self.value = code
6 changes: 3 additions & 3 deletions photostation/photostation.py → photostation/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
import time
import io
from requests_toolbelt.downloadutils import stream
from session import SynologyAuthSession
from utils import PhotoStationUtils
from error import SynologyException
from photostation.session import SynologyAuthSession
from photostation.utils import PhotoStationUtils
from photostation.error import SynologyException
from pprint import pprint, pformat

class PhotoStationService(object):
Expand Down
7 changes: 5 additions & 2 deletions photostation/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import os
import pickle
import time
from urlparse import urlparse
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from pprint import pprint, pformat
from error import SynologyException
from photostation.error import SynologyException

class SynologySession(object):

Expand Down
4 changes: 3 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

setup(
name='photostation',
version='0.1.4',
version='0.1.5',
description='A Python API to communicate with Photo Station running on Synology NAS.',
long_description=long_description,
url='https://github.com/skarppi/python-photostation',
Expand All @@ -30,6 +30,8 @@
'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',
],
keywords='synology dsm photo station web api',
Expand Down

0 comments on commit c310748

Please sign in to comment.