Skip to content

daxeel/pypixoto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI version

pypixoto V1.1

Python SDK for accessing data of Pixoto.com

What is Pixoto.com?

Pixoto.com is an online world famous photo sharing social network for photographers similar to 500px.com, flickr etc. Check out its site for more information.

Why this project (pypixoto)?

I have searched for official API or SDK for pixoto.com but not found anything from where i can access the user's information from pixot.com. That is why i decided to make one. And here it is - Python SDK for accessing user's data from pixoto.com.

Installation

Installation of dependency

pypixoto is using beautifulsoup4. So, before installing pypixoto you need to install beautifulsoup.

pip install beautifulsoup4

OR

sudo pip install beautifulsoup4

Installation of pypixoto

Install using pip
pip install pypixoto

OR

sudo pip install pypixoto
Install using setup.py

STEP 1 : Clone this repository

git clone https://github.com/daxeel/pypixoto.git

STEP 2 : Change working directory

cd pypixoto

STEP 3 : Install pypixoto using setip.py

python setup.py install

Documentation

Now you are ready to work with pypixoto.

Getting the user's information

Initialize pypixoto with targeted username
>>> pyobj = pypixoto.Pixoto('USERNAME')
Now, let's get the full name of this user
>>> pyobj.full_name()
Biography of user
>>> pyobj.about()
Location of user (country)
>>> pyobj.location('country')
Location of user (region)
>>> pyobj.location('region')
Location of user (localoty)
>>> pyobj.location('locality')
Number of awards awarded to user
>>> pyobj.n_awards()
Number of points collected by user
>>> pyobj.n_points()
Number of images posted by user
>>> pyobj.n_images()
Number of followers
>>> pyobj.n_followers()
Number of following
>>> pyobj.n_following()

Getting the information of user's published photos

Syntax
>>> pyobj.get_images_info(N, LIST)

Here, N = Information of how much images you want to get
LIST = List of required information

You can pass the following items to LIST

title get the title of image
description get the description of image
category get the category in which the image is published
subcategory get the subcategory of image
tags get the tags
date_published get the date of image published
date_taken get the date of image taken
image_url get direct image link
data_url get the link to pixoto page of that image
wins get total wins of image
losses get total losses of image
completed_duels get the number of duels completed
rating get the ratings of image
cam_company get the campany of camera by which the image is taken
cam_model get the camera model by which the image is taken
focal_length get the focal length
shutter_speed get the shutter speed
aperture get the aperture setting
iso_film get the iso
width get width of actual image
height get height of actual image
Example 1
>>> img_info = pyobj.get_recent_images(3, ['title', 'description'])
>>> print img_info
[{
	'description': 'None',
	'title': 'The Path'
}, {
	'description': 'None',
	'title': 'Dawn in Simpsonville'
}, {
	'description': 'None',
	'title': 'The Point'
}]
Example 2
>>> img_info = pyobj.get_images_info(3, ['title', 'description', 'category', 'subcategory', 'tags', 'date_published', 'date_taken', 'image_url', 'data_url', 'wins', 'losses', 'completed_duels', 'rating', 'cam_company', 'cam_model', 'focal_length', 'shutter_speed', 'aperture', 'iso_film', 'width', 'height'])
>>> print img_info
[{
	'category': 'Landscapes',
	'rating': '609.769545742',
	'data_url': 'http://www.pixoto.com/images-photography/landscapes/forests/the-path-5681033682354176',
	'losses': '49',
	'subcategory': 'Forests',
	'date_taken': 'January 8, 2014',
	'tags': "[u'dave sansom', u'maui', u'beautiful skies', u'hana', u'photographs', u'landscape', u'rainforest']",
	'completed_duels': '106',
	'wins': '57',
	'title': 'The Path',
	'cam_model': 'NIKON D810',
	'height': '7360',
	'date_published': 'January 1, 2016',
	'image_url': 'http://lh3.googleusercontent.com/ZEs-B-J5nnzuBcEmWHorYvoznP_JZv8hleL6kI5wAaKw6pQedJxtC1oTtN7tTLu0_I1fDaE2_gQSHoVUUTCkYrU',
	'focal_length': '48.0 mm',
	'cam_company': 'Nikon',
	'iso_film': '500',
	'aperture': 'F7.1',
	'shutter_speed': '1/13 sec',
	'width': '4912',
	'description': 'None'
}, {
	'category': 'Landscapes',
	'rating': '578.684773858',
	'data_url': 'http://www.pixoto.com/images-photography/landscapes/sunsets-and-sunrises/dawn-in-simpsonville-4528745496444928',
	'losses': '41',
	'subcategory': 'Sunsets & Sunrises',
	'date_taken': 'October 8, 2015',
	'tags': "[u'dave sansom', u'golf course', u'dawn', u'beautiful skies', u'sunset', u'golf club', u'louisville', u'university of louisville', u'sunrise', u'morning', u'landscape', u'kentucky']",
	'completed_duels': '100',
	'wins': '59',
	'title': 'Dawn in Simpsonville',
	'cam_model': 'NIKON D810',
	'height': '4912',
	'date_published': 'December 31, 2015',
	'image_url': 'http://lh3.googleusercontent.com/Wx2bOEL7QHj095fth8R30g11jaqezDhV6z4rv_GdfthYzGMad7jNagmdxkxD05r6S44hcetUjaYAjYPsPOvFczWr',
	'focal_length': '31.0 mm',
	'cam_company': 'Nikon',
	'iso_film': '640',
	'aperture': 'F9',
	'shutter_speed': '1/60 sec',
	'width': '7360',
	'description': 'None'
}, {
	'category': 'Landscapes',
	'rating': '509.132686773',
	'data_url': 'http://www.pixoto.com/images-photography/landscapes/sunsets-and-sunrises/the-point-5043316938244096',
	'losses': '48',
	'subcategory': 'Sunsets & Sunrises',
	'date_taken': 'November 17, 2015',
	'tags': "[u'dave sansom', u'maui', u'golf course photographs', u'kapalua', u'beautiful skies', u'landscape']",
	'completed_duels': '100',
	'wins': '52',
	'title': 'The Point',
	'cam_model': 'NIKON D810',
	'height': '7360',
	'date_published': 'December 30, 2015',
	'image_url': 'http://lh3.googleusercontent.com/EyqJ3cHtsQg36G-i2bnzL5Tx-5Md6wMa6Wa_W27K4PoZwDa6yOLOh17sJChDpOUGhAHdQqnhtomW_4S_Dv13JA',
	'focal_length': '18.0 mm',
	'cam_company': 'Nikon',
	'iso_film': '100',
	'aperture': 'F9',
	'shutter_speed': '1/4 sec',
	'width': '4912',
	'description': 'None'
}]

About

Python SDK for accessing data of Pixoto.com

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages