Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miki725/pyzenfolio
Light-weight Zenfolio API wrapper
https://github.com/miki725/pyzenfolio
Last synced: 12 days ago
JSON representation
Light-weight Zenfolio API wrapper
- Host: GitHub
- URL: https://github.com/miki725/pyzenfolio
- Owner: miki725
- License: other
- Created: 2013-12-28T21:27:05.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-12-06T22:50:40.000Z (almost 9 years ago)
- Last Synced: 2024-10-31T20:09:15.574Z (12 days ago)
- Language: Python
- Size: 13.7 KB
- Stars: 1
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE.rst
Awesome Lists containing this project
README
PyZenfolio
==========.. image:: https://badge.fury.io/py/pyzenfolio.png
:target: http://badge.fury.io/py/pyzenfolioLight-weight Zenfolio API Python wrapper.
Using this wrapper is pretty straight-forward and does not
require to use any special data-structures. Everything is
returned as an ``AttrDict`` (same as ``dict`` however
dictionary items can be accessed via Python attribute
dot notation ``foo['bar'] == foo.bar``).Example
-------::
from pyzenfolio import PyZenfolio
api = PyZenfolio(auth={'username': 'foo', 'password': 'bar'})
api.Authenticate()# lookup user
user = api.LoadPublicProfile()
# AttrDict allows to access items like this
domain = user.DomainName
uploaded_photos = user.PhotoCount# create photoset
photoset = api.CreatePhotoSet(
user.RootGroup.Id,
attr={
'Title': 'foo'
}
)
photoset_url = photoset.PageUrl# upload image
api.UploadPhoto(photoset, 'bar.jpg')# get image download URL
image = api.LoadPhotoSetPhotos(photoset.Id)
url = image.OriginalUrl.. warning::
This is a beta release. Please report bugs via GitHub issues.
.. image:: https://d2weczhvl823v0.cloudfront.net/miki725/pyzenfolio/trend.png
:alt: Bitdeli badge
:target: https://bitdeli.com/free