SlideShare a Scribd company logo
1 of 13
Download to read offline
Py
                      Python API interface for Foursquare




                                          Marcel Caraciolo
                                           Cientist Chief, Orygens
                                   @marcelcaraciolo / marcel@orygens.com
                                        http://aimotion.blogspot.com
Saturday, January 28, 2012
First, What is Foursquare ?

  A location based social network
  Share with your friends where you are and and what to do there
  Discover new places and Share reviews




                             http://www.foursquare.com
Saturday, January 28, 2012
Foursquare API

   Foursquare provides an API to create new apps for using their data


   It has several components to
   access: User Data, Checkins
   Data, Reviews,Venues, etc.


   Using REST API and Oauth




Saturday, January 28, 2012
PyFoursquare
    Created at 2010 as a private project for my master thesis.
    Be a wrapper for interfacing with Foursquare API in Python
    There are many others but they are not updated




                https://github.com/marcelcaraciolo/foursquare
Saturday, January 28, 2012
Tweepy

    A Python library for accessing the Twitter API.
    Easy-To-Use API and Models-based oriented
    Each entity of Twitter is represented as a Model

     import tweepy

     public_tweets = tweepy.api.public_timeline()
     for tweet in public_tweets:
         print tweet.text




Saturday, January 28, 2012
PyFoursquare

  The idea was to be a Tweepy-based Architecture for Foursquare
   It is on version 0.0.12
  Only supports Places Details, Tips, Users and Places Search
 class Model(object):

     def __init__(self, api=None):
         self._api = api

     def __getstate__(self):
         # pickle
         pickle = dict(self.__dict__)
         try:
             del pickle['_api'] # do not pickle the API reference   class Tip(Model):
         except KeyError:                                               @classmethod
             pass                                                       def parse(cls, api, json):
         return pickle                                                      tip = cls(api)
                                                                            for key, value in json.items():
     @classmethod                                                               if key == 'done' or key == 'todo':
     def parse(cls, api, json):                                                     setattr(tip, key, value['count'])
         """Parse a JSON object into a model instance."""                       elif key == 'user':
                                                                                    setattr(tip, key, User.parse(api, value))
         raise NotImplementedError
                                                                                else:
                                                                                    setattr(tip, key, value)
                                                                            return tip

                                                                        def __repr__(self):
                                                                            return self.text[:10].encode('utf-8')




Saturday, January 28, 2012
PyFoursquare

  Step 1 : Install the PyFoursquare

        easy_install pyfoursquare

        >>> import pyfoursquare




Saturday, January 28, 2012
PyFoursquare

    Step 2 : Create your Developer Account and App




                             https://foursquare.com/oauth/



Saturday, January 28, 2012
PyFoursquare
  Step 3 : Authenticate your App
                             import foursquare
                             #
                             # This mode of authentication is the required one for Foursquare
                             # The client id and client secret can be found on your application's Details
                             # page located at https://foursquare.com/oauth/
                             client_id = ""
                             client_secret = ""
                             callback = ''
                             auth = foursquare.OauthHandler(client_id, client_secret, callback)
                             #First Redirect the user who wish to authenticate to.
                             #It will be create the authorization url for your app
                             auth_url = auth.get_authorization_url()
                             print 'Please authorize: ' + auth_url


                             #If the user accepts, it will be redirected back
                             #to your registered REDIRECT_URI.
                             #It will give you a code as
                             #https://YOUR_REGISTERED_REDIRECT_URI/?code=CODE
                             code = raw_input('The code: ').strip()


                             #Now your server will make a request for
                             #the access token. You can save this
                             #for future access for your app for this user
                             access_token = auth.get_access_token(code)
                             print 'Your access token is ' + access_token




Saturday, January 28, 2012
PyFoursquare
  Step 4 : After Authorizing play with the API, yeah!

                             api = foursquare.API(auth)


                             #Now you can access the Foursquare API!
                             result = api.venues_search(query='Burburinho', ll='-8.063542,-34.872891')


                             #You can acess as a Model
                             print dir(result[0])


                             #Access all its attributes
                             print result[0].name




Saturday, January 28, 2012
Release Plan
         More Coverage tests in the API
         Support for new entities: Photos, Checkins, etc.
          More Examples and docs
 MIT License and It is Open-Source!
  Fork and pull requests mandatory!

                       https://github.com/marcelcaraciolo/foursquare




Saturday, January 28, 2012
Download your app at http://www.foursquare.com




Saturday, January 28, 2012
Py
                      Python API interface for Foursquare




                                          Marcel Caraciolo
                                           Cientist Chief, Orygens
                                   @marcelcaraciolo / marcel@orygens.com
                                        http://aimotion.blogspot.com
Saturday, January 28, 2012

More Related Content

What's hot

PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021Ayesh Karunaratne
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Seri Moth
 
SPL to the Rescue - Tek 09
SPL to the Rescue - Tek 09SPL to the Rescue - Tek 09
SPL to the Rescue - Tek 09Elizabeth Smith
 
5 Tips for Better JavaScript
5 Tips for Better JavaScript5 Tips for Better JavaScript
5 Tips for Better JavaScriptTodd Anglin
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the BeastBastian Feder
 
What's new in PHP 8.0?
What's new in PHP 8.0?What's new in PHP 8.0?
What's new in PHP 8.0?Nikita Popov
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09Bastian Feder
 
Developing components and extensions for ext js
Developing components and extensions for ext jsDeveloping components and extensions for ext js
Developing components and extensions for ext jsMats Bryntse
 
Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?Nikita Popov
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2Hugo Hamon
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf Conference
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Pythonkwatch
 
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.Graham Dumpleton
 

What's hot (20)

has("builds")
has("builds")has("builds")
has("builds")
 
Symfony2 meets propel 1.5
Symfony2 meets propel 1.5Symfony2 meets propel 1.5
Symfony2 meets propel 1.5
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
 
Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02Jsphp 110312161301-phpapp02
Jsphp 110312161301-phpapp02
 
Introduce Django
Introduce DjangoIntroduce Django
Introduce Django
 
SPL to the Rescue - Tek 09
SPL to the Rescue - Tek 09SPL to the Rescue - Tek 09
SPL to the Rescue - Tek 09
 
5 Tips for Better JavaScript
5 Tips for Better JavaScript5 Tips for Better JavaScript
5 Tips for Better JavaScript
 
The Beauty and the Beast
The Beauty and the BeastThe Beauty and the Beast
The Beauty and the Beast
 
Ant
Ant Ant
Ant
 
JavaScript ES6
JavaScript ES6JavaScript ES6
JavaScript ES6
 
What's new in PHP 8.0?
What's new in PHP 8.0?What's new in PHP 8.0?
What's new in PHP 8.0?
 
The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09The Beauty And The Beast Php N W09
The Beauty And The Beast Php N W09
 
Prototype
PrototypePrototype
Prototype
 
Developing components and extensions for ext js
Developing components and extensions for ext jsDeveloping components and extensions for ext js
Developing components and extensions for ext js
 
Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?Typed Properties and more: What's coming in PHP 7.4?
Typed Properties and more: What's coming in PHP 7.4?
 
Speed up your developments with Symfony2
Speed up your developments with Symfony2Speed up your developments with Symfony2
Speed up your developments with Symfony2
 
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
ZFConf 2010: Zend Framework & MVC, Model Implementation (Part 2, Dependency I...
 
Design patterns in PHP
Design patterns in PHPDesign patterns in PHP
Design patterns in PHP
 
Fantastic DSL in Python
Fantastic DSL in PythonFantastic DSL in Python
Fantastic DSL in Python
 
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
Hear no evil, see no evil, patch no evil: Or, how to monkey-patch safely.
 

Viewers also liked

Computação Científica com Python, Numpy e Scipy
Computação Científica com Python, Numpy e ScipyComputação Científica com Python, Numpy e Scipy
Computação Científica com Python, Numpy e ScipyMarcel Caraciolo
 
Dados abertos ciencia_livre
Dados abertos ciencia_livreDados abertos ciencia_livre
Dados abertos ciencia_livreWikimedia Brasil
 
Palestra Institucional PUG-PE
Palestra Institucional PUG-PEPalestra Institucional PUG-PE
Palestra Institucional PUG-PEMarcel Caraciolo
 
Recomendação de Conteúdo para Redes Sociais Educativas
Recomendação de Conteúdo para Redes Sociais EducativasRecomendação de Conteúdo para Redes Sociais Educativas
Recomendação de Conteúdo para Redes Sociais EducativasMarcel Caraciolo
 
Python simplecv
Python simplecvPython simplecv
Python simplecvUFPA
 
Porque aprender haskell me fez um programador python melhor?
Porque aprender haskell me fez um programador python melhor?Porque aprender haskell me fez um programador python melhor?
Porque aprender haskell me fez um programador python melhor?UFPA
 
Python 3.x - Ihh.. E agora ? Como faço ?
Python 3.x - Ihh.. E agora ? Como faço ?Python 3.x - Ihh.. E agora ? Como faço ?
Python 3.x - Ihh.. E agora ? Como faço ?Marcel Caraciolo
 
Crab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsCrab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsMarcel Caraciolo
 
Mini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPE
Mini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPEMini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPE
Mini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPEMarcel Caraciolo
 
Programando em python recursao
Programando em python   recursaoProgramando em python   recursao
Programando em python recursaosamuelthiago
 
Pug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debuggerPug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debuggerpugpe
 
Uma implementação de suporte a
Uma implementação de suporte a Uma implementação de suporte a
Uma implementação de suporte a Rômulo Jales
 
Processamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHPProcessamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHPIvo Nascimento
 
Lista de exercícios III Desafios python para zumbis
Lista de exercícios III Desafios python para zumbisLista de exercícios III Desafios python para zumbis
Lista de exercícios III Desafios python para zumbisFATEC São José dos Campos
 
Tdd not sure if testing or developing
Tdd  not sure if testing or developingTdd  not sure if testing or developing
Tdd not sure if testing or developingRenato Oliveira
 
TCC Tecnologia em Sistemas para Internet
TCC Tecnologia em Sistemas para InternetTCC Tecnologia em Sistemas para Internet
TCC Tecnologia em Sistemas para InternetClaudeir Novais
 
Apresentando o I Toró de Palestras do PUG-PE
Apresentando o I Toró de Palestras do PUG-PEApresentando o I Toró de Palestras do PUG-PE
Apresentando o I Toró de Palestras do PUG-PEMarcel Caraciolo
 
Pyjamas: Uma Ferramenta Pythônica para Web
Pyjamas: Uma Ferramenta Pythônica para WebPyjamas: Uma Ferramenta Pythônica para Web
Pyjamas: Uma Ferramenta Pythônica para WebNielson Santana
 
Python na formacao_de_jovens
Python na formacao_de_jovensPython na formacao_de_jovens
Python na formacao_de_jovensMarcos Egito
 

Viewers also liked (20)

Computação Científica com Python, Numpy e Scipy
Computação Científica com Python, Numpy e ScipyComputação Científica com Python, Numpy e Scipy
Computação Científica com Python, Numpy e Scipy
 
Dados abertos ciencia_livre
Dados abertos ciencia_livreDados abertos ciencia_livre
Dados abertos ciencia_livre
 
Palestra Institucional PUG-PE
Palestra Institucional PUG-PEPalestra Institucional PUG-PE
Palestra Institucional PUG-PE
 
Recomendação de Conteúdo para Redes Sociais Educativas
Recomendação de Conteúdo para Redes Sociais EducativasRecomendação de Conteúdo para Redes Sociais Educativas
Recomendação de Conteúdo para Redes Sociais Educativas
 
Python simplecv
Python simplecvPython simplecv
Python simplecv
 
Porque aprender haskell me fez um programador python melhor?
Porque aprender haskell me fez um programador python melhor?Porque aprender haskell me fez um programador python melhor?
Porque aprender haskell me fez um programador python melhor?
 
Python 3.x - Ihh.. E agora ? Como faço ?
Python 3.x - Ihh.. E agora ? Como faço ?Python 3.x - Ihh.. E agora ? Como faço ?
Python 3.x - Ihh.. E agora ? Como faço ?
 
Crab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation SystemsCrab - A Python Framework for Building Recommendation Systems
Crab - A Python Framework for Building Recommendation Systems
 
Mini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPE
Mini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPEMini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPE
Mini-Curso de Python dia 21/03 (Segunda-Feira) no II Workshop de SL do CIN/UFPE
 
Programando em python recursao
Programando em python   recursaoProgramando em python   recursao
Programando em python recursao
 
Pug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debuggerPug pe vii - luciano rodrigues - debugger
Pug pe vii - luciano rodrigues - debugger
 
Uma implementação de suporte a
Uma implementação de suporte a Uma implementação de suporte a
Uma implementação de suporte a
 
Processamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHPProcessamento de Linguagem natural com PHP
Processamento de Linguagem natural com PHP
 
Lista de exercícios III Desafios python para zumbis
Lista de exercícios III Desafios python para zumbisLista de exercícios III Desafios python para zumbis
Lista de exercícios III Desafios python para zumbis
 
Tdd not sure if testing or developing
Tdd  not sure if testing or developingTdd  not sure if testing or developing
Tdd not sure if testing or developing
 
W2py pyconpe
W2py pyconpeW2py pyconpe
W2py pyconpe
 
TCC Tecnologia em Sistemas para Internet
TCC Tecnologia em Sistemas para InternetTCC Tecnologia em Sistemas para Internet
TCC Tecnologia em Sistemas para Internet
 
Apresentando o I Toró de Palestras do PUG-PE
Apresentando o I Toró de Palestras do PUG-PEApresentando o I Toró de Palestras do PUG-PE
Apresentando o I Toró de Palestras do PUG-PE
 
Pyjamas: Uma Ferramenta Pythônica para Web
Pyjamas: Uma Ferramenta Pythônica para WebPyjamas: Uma Ferramenta Pythônica para Web
Pyjamas: Uma Ferramenta Pythônica para Web
 
Python na formacao_de_jovens
Python na formacao_de_jovensPython na formacao_de_jovens
Python na formacao_de_jovens
 

Similar to PyFoursquare: Python Library for Foursquare

How to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAMHow to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAMProvectus
 
Webinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in HeavenWebinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in HeavenSébastien Levert
 
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...Sébastien Levert
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngineikailan
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIswesley chun
 
Mobile, web and cloud - the triple crown of modern applications
Mobile, web and cloud -  the triple crown of modern applicationsMobile, web and cloud -  the triple crown of modern applications
Mobile, web and cloud - the triple crown of modern applicationsIdo Green
 
Designing CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsDesigning CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsNeil Crookes
 
Exploring MORE Google (Cloud) APIs with Python
Exploring MORE Google (Cloud) APIs with PythonExploring MORE Google (Cloud) APIs with Python
Exploring MORE Google (Cloud) APIs with Pythonwesley chun
 
Method and decorator
Method and decoratorMethod and decorator
Method and decoratorCeline George
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsTom Johnson
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIsGiuseppe Marchi
 
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPConnecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPraimonesteve
 
SoftLayer API 12032015
SoftLayer API  12032015SoftLayer API  12032015
SoftLayer API 12032015Nacho Daza
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Cogapp
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointYaroslav Pentsarskyy [MVP]
 
Open social for science a sciverse primer - mysimplesearch
Open social for science   a sciverse primer - mysimplesearchOpen social for science   a sciverse primer - mysimplesearch
Open social for science a sciverse primer - mysimplesearchremko caprio
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.comJUG Genova
 

Similar to PyFoursquare: Python Library for Foursquare (20)

How to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAMHow to implement authorization in your backend with AWS IAM
How to implement authorization in your backend with AWS IAM
 
Api
ApiApi
Api
 
Webinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in HeavenWebinar - Office 365 & PowerShell : A Match Made in Heaven
Webinar - Office 365 & PowerShell : A Match Made in Heaven
 
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
SharePoint Saturday Ottawa 2015 - Office 365 and PowerShell - A match made in...
 
Building TweetEngine
Building TweetEngineBuilding TweetEngine
Building TweetEngine
 
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIsExploring Google APIs 102: Cloud vs. non-GCP Google APIs
Exploring Google APIs 102: Cloud vs. non-GCP Google APIs
 
Mobile, web and cloud - the triple crown of modern applications
Mobile, web and cloud -  the triple crown of modern applicationsMobile, web and cloud -  the triple crown of modern applications
Mobile, web and cloud - the triple crown of modern applications
 
Designing CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIsDesigning CakePHP plugins for consuming APIs
Designing CakePHP plugins for consuming APIs
 
Exploring MORE Google (Cloud) APIs with Python
Exploring MORE Google (Cloud) APIs with PythonExploring MORE Google (Cloud) APIs with Python
Exploring MORE Google (Cloud) APIs with Python
 
Method and decorator
Method and decoratorMethod and decorator
Method and decorator
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIs
 
Connecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOPConnecting your Python App to OpenERP through OOOP
Connecting your Python App to OpenERP through OOOP
 
SoftLayer API 12032015
SoftLayer API  12032015SoftLayer API  12032015
SoftLayer API 12032015
 
Crafting [Better] API Clients
Crafting [Better] API ClientsCrafting [Better] API Clients
Crafting [Better] API Clients
 
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
Test-driven Development with Drupal and Codeception (DrupalCamp Brighton)
 
Get started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePointGet started with building native mobile apps interacting with SharePoint
Get started with building native mobile apps interacting with SharePoint
 
Codeigniter
CodeigniterCodeigniter
Codeigniter
 
Open social for science a sciverse primer - mysimplesearch
Open social for science   a sciverse primer - mysimplesearchOpen social for science   a sciverse primer - mysimplesearch
Open social for science a sciverse primer - mysimplesearch
 
Playing with parse.com
Playing with parse.comPlaying with parse.com
Playing with parse.com
 

More from Marcel Caraciolo

Como interpretar seu próprio genoma com Python
Como interpretar seu próprio genoma com PythonComo interpretar seu próprio genoma com Python
Como interpretar seu próprio genoma com PythonMarcel Caraciolo
 
Joblib: Lightweight pipelining for parallel jobs (v2)
Joblib:  Lightweight pipelining for parallel jobs (v2)Joblib:  Lightweight pipelining for parallel jobs (v2)
Joblib: Lightweight pipelining for parallel jobs (v2)Marcel Caraciolo
 
Construindo softwares de bioinformática para análises clínicas : Desafios e...
Construindo softwares  de bioinformática  para análises clínicas : Desafios e...Construindo softwares  de bioinformática  para análises clínicas : Desafios e...
Construindo softwares de bioinformática para análises clínicas : Desafios e...Marcel Caraciolo
 
Como Python ajudou a automatizar o nosso laboratório v.2
Como Python ajudou a automatizar o nosso laboratório v.2Como Python ajudou a automatizar o nosso laboratório v.2
Como Python ajudou a automatizar o nosso laboratório v.2Marcel Caraciolo
 
Como Python pode ajudar na automação do seu laboratório
Como Python pode ajudar na automação do  seu laboratórioComo Python pode ajudar na automação do  seu laboratório
Como Python pode ajudar na automação do seu laboratórioMarcel Caraciolo
 
Python on Science ? Yes, We can.
Python on Science ?   Yes, We can.Python on Science ?   Yes, We can.
Python on Science ? Yes, We can.Marcel Caraciolo
 
Oficina Python: Hackeando a Web com Python 3
Oficina Python: Hackeando a Web com Python 3Oficina Python: Hackeando a Web com Python 3
Oficina Python: Hackeando a Web com Python 3Marcel Caraciolo
 
Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)Marcel Caraciolo
 
Opensource - Como começar e dá dinheiro ?
Opensource - Como começar e dá dinheiro ?Opensource - Como começar e dá dinheiro ?
Opensource - Como começar e dá dinheiro ?Marcel Caraciolo
 
Benchy, python framework for performance benchmarking of Python Scripts
Benchy, python framework for performance benchmarking  of Python ScriptsBenchy, python framework for performance benchmarking  of Python Scripts
Benchy, python framework for performance benchmarking of Python ScriptsMarcel Caraciolo
 
Python e 10 motivos por que devo conhece-la ?
Python e 10 motivos por que devo conhece-la ?Python e 10 motivos por que devo conhece-la ?
Python e 10 motivos por que devo conhece-la ?Marcel Caraciolo
 
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...Marcel Caraciolo
 
Benchy: Lightweight framework for Performance Benchmarks
Benchy: Lightweight framework for Performance Benchmarks Benchy: Lightweight framework for Performance Benchmarks
Benchy: Lightweight framework for Performance Benchmarks Marcel Caraciolo
 
Construindo Sistemas de Recomendação com Python
Construindo Sistemas de Recomendação com PythonConstruindo Sistemas de Recomendação com Python
Construindo Sistemas de Recomendação com PythonMarcel Caraciolo
 
Python, A pílula Azul da programação
Python, A pílula Azul da programaçãoPython, A pílula Azul da programação
Python, A pílula Azul da programaçãoMarcel Caraciolo
 
Construindo Soluções Científicas com Big Data & MapReduce
Construindo Soluções Científicas com Big Data & MapReduceConstruindo Soluções Científicas com Big Data & MapReduce
Construindo Soluções Científicas com Big Data & MapReduceMarcel Caraciolo
 
Como Python está mudando a forma de aprendizagem à distância no Brasil
Como Python está mudando a forma de aprendizagem à distância no BrasilComo Python está mudando a forma de aprendizagem à distância no Brasil
Como Python está mudando a forma de aprendizagem à distância no BrasilMarcel Caraciolo
 
Novas Tendências para a Educação a Distância: Como reinventar a educação ?
Novas Tendências para a Educação a Distância: Como reinventar a educação ?Novas Tendências para a Educação a Distância: Como reinventar a educação ?
Novas Tendências para a Educação a Distância: Como reinventar a educação ?Marcel Caraciolo
 
Aula WebCrawlers com Regex - PyCursos
Aula WebCrawlers com Regex - PyCursosAula WebCrawlers com Regex - PyCursos
Aula WebCrawlers com Regex - PyCursosMarcel Caraciolo
 

More from Marcel Caraciolo (20)

Como interpretar seu próprio genoma com Python
Como interpretar seu próprio genoma com PythonComo interpretar seu próprio genoma com Python
Como interpretar seu próprio genoma com Python
 
Joblib: Lightweight pipelining for parallel jobs (v2)
Joblib:  Lightweight pipelining for parallel jobs (v2)Joblib:  Lightweight pipelining for parallel jobs (v2)
Joblib: Lightweight pipelining for parallel jobs (v2)
 
Construindo softwares de bioinformática para análises clínicas : Desafios e...
Construindo softwares  de bioinformática  para análises clínicas : Desafios e...Construindo softwares  de bioinformática  para análises clínicas : Desafios e...
Construindo softwares de bioinformática para análises clínicas : Desafios e...
 
Como Python ajudou a automatizar o nosso laboratório v.2
Como Python ajudou a automatizar o nosso laboratório v.2Como Python ajudou a automatizar o nosso laboratório v.2
Como Python ajudou a automatizar o nosso laboratório v.2
 
Como Python pode ajudar na automação do seu laboratório
Como Python pode ajudar na automação do  seu laboratórioComo Python pode ajudar na automação do  seu laboratório
Como Python pode ajudar na automação do seu laboratório
 
Python on Science ? Yes, We can.
Python on Science ?   Yes, We can.Python on Science ?   Yes, We can.
Python on Science ? Yes, We can.
 
Oficina Python: Hackeando a Web com Python 3
Oficina Python: Hackeando a Web com Python 3Oficina Python: Hackeando a Web com Python 3
Oficina Python: Hackeando a Web com Python 3
 
Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)Recommender Systems with Ruby (adding machine learning, statistics, etc)
Recommender Systems with Ruby (adding machine learning, statistics, etc)
 
Opensource - Como começar e dá dinheiro ?
Opensource - Como começar e dá dinheiro ?Opensource - Como começar e dá dinheiro ?
Opensource - Como começar e dá dinheiro ?
 
Big Data com Python
Big Data com PythonBig Data com Python
Big Data com Python
 
Benchy, python framework for performance benchmarking of Python Scripts
Benchy, python framework for performance benchmarking  of Python ScriptsBenchy, python framework for performance benchmarking  of Python Scripts
Benchy, python framework for performance benchmarking of Python Scripts
 
Python e 10 motivos por que devo conhece-la ?
Python e 10 motivos por que devo conhece-la ?Python e 10 motivos por que devo conhece-la ?
Python e 10 motivos por que devo conhece-la ?
 
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...
GeoMapper, Python Script for Visualizing Data on Social Networks with Geo-loc...
 
Benchy: Lightweight framework for Performance Benchmarks
Benchy: Lightweight framework for Performance Benchmarks Benchy: Lightweight framework for Performance Benchmarks
Benchy: Lightweight framework for Performance Benchmarks
 
Construindo Sistemas de Recomendação com Python
Construindo Sistemas de Recomendação com PythonConstruindo Sistemas de Recomendação com Python
Construindo Sistemas de Recomendação com Python
 
Python, A pílula Azul da programação
Python, A pílula Azul da programaçãoPython, A pílula Azul da programação
Python, A pílula Azul da programação
 
Construindo Soluções Científicas com Big Data & MapReduce
Construindo Soluções Científicas com Big Data & MapReduceConstruindo Soluções Científicas com Big Data & MapReduce
Construindo Soluções Científicas com Big Data & MapReduce
 
Como Python está mudando a forma de aprendizagem à distância no Brasil
Como Python está mudando a forma de aprendizagem à distância no BrasilComo Python está mudando a forma de aprendizagem à distância no Brasil
Como Python está mudando a forma de aprendizagem à distância no Brasil
 
Novas Tendências para a Educação a Distância: Como reinventar a educação ?
Novas Tendências para a Educação a Distância: Como reinventar a educação ?Novas Tendências para a Educação a Distância: Como reinventar a educação ?
Novas Tendências para a Educação a Distância: Como reinventar a educação ?
 
Aula WebCrawlers com Regex - PyCursos
Aula WebCrawlers com Regex - PyCursosAula WebCrawlers com Regex - PyCursos
Aula WebCrawlers com Regex - PyCursos
 

Recently uploaded

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Recently uploaded (20)

A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

PyFoursquare: Python Library for Foursquare

  • 1. Py Python API interface for Foursquare Marcel Caraciolo Cientist Chief, Orygens @marcelcaraciolo / marcel@orygens.com http://aimotion.blogspot.com Saturday, January 28, 2012
  • 2. First, What is Foursquare ? A location based social network Share with your friends where you are and and what to do there Discover new places and Share reviews http://www.foursquare.com Saturday, January 28, 2012
  • 3. Foursquare API Foursquare provides an API to create new apps for using their data It has several components to access: User Data, Checkins Data, Reviews,Venues, etc. Using REST API and Oauth Saturday, January 28, 2012
  • 4. PyFoursquare Created at 2010 as a private project for my master thesis. Be a wrapper for interfacing with Foursquare API in Python There are many others but they are not updated https://github.com/marcelcaraciolo/foursquare Saturday, January 28, 2012
  • 5. Tweepy A Python library for accessing the Twitter API. Easy-To-Use API and Models-based oriented Each entity of Twitter is represented as a Model import tweepy public_tweets = tweepy.api.public_timeline() for tweet in public_tweets: print tweet.text Saturday, January 28, 2012
  • 6. PyFoursquare The idea was to be a Tweepy-based Architecture for Foursquare It is on version 0.0.12 Only supports Places Details, Tips, Users and Places Search class Model(object):     def __init__(self, api=None):         self._api = api     def __getstate__(self):         # pickle         pickle = dict(self.__dict__)         try:             del pickle['_api'] # do not pickle the API reference class Tip(Model):         except KeyError:     @classmethod             pass     def parse(cls, api, json):         return pickle         tip = cls(api)         for key, value in json.items():     @classmethod             if key == 'done' or key == 'todo':     def parse(cls, api, json):                 setattr(tip, key, value['count'])         """Parse a JSON object into a model instance."""             elif key == 'user':                 setattr(tip, key, User.parse(api, value))         raise NotImplementedError             else:                 setattr(tip, key, value)         return tip     def __repr__(self):         return self.text[:10].encode('utf-8') Saturday, January 28, 2012
  • 7. PyFoursquare Step 1 : Install the PyFoursquare easy_install pyfoursquare >>> import pyfoursquare Saturday, January 28, 2012
  • 8. PyFoursquare Step 2 : Create your Developer Account and App https://foursquare.com/oauth/ Saturday, January 28, 2012
  • 9. PyFoursquare Step 3 : Authenticate your App import foursquare # # This mode of authentication is the required one for Foursquare # The client id and client secret can be found on your application's Details # page located at https://foursquare.com/oauth/ client_id = "" client_secret = "" callback = '' auth = foursquare.OauthHandler(client_id, client_secret, callback) #First Redirect the user who wish to authenticate to. #It will be create the authorization url for your app auth_url = auth.get_authorization_url() print 'Please authorize: ' + auth_url #If the user accepts, it will be redirected back #to your registered REDIRECT_URI. #It will give you a code as #https://YOUR_REGISTERED_REDIRECT_URI/?code=CODE code = raw_input('The code: ').strip() #Now your server will make a request for #the access token. You can save this #for future access for your app for this user access_token = auth.get_access_token(code) print 'Your access token is ' + access_token Saturday, January 28, 2012
  • 10. PyFoursquare Step 4 : After Authorizing play with the API, yeah! api = foursquare.API(auth) #Now you can access the Foursquare API! result = api.venues_search(query='Burburinho', ll='-8.063542,-34.872891') #You can acess as a Model print dir(result[0]) #Access all its attributes print result[0].name Saturday, January 28, 2012
  • 11. Release Plan More Coverage tests in the API Support for new entities: Photos, Checkins, etc. More Examples and docs MIT License and It is Open-Source! Fork and pull requests mandatory! https://github.com/marcelcaraciolo/foursquare Saturday, January 28, 2012
  • 12. Download your app at http://www.foursquare.com Saturday, January 28, 2012
  • 13. Py Python API interface for Foursquare Marcel Caraciolo Cientist Chief, Orygens @marcelcaraciolo / marcel@orygens.com http://aimotion.blogspot.com Saturday, January 28, 2012