Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    Flask-Github 0.1.3

    Download button

    No screenshots available
    Downloads: 98  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Excellent (5.0/5)
    1 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Jarod Luebbert | More programs
    MIT/X Consortium Lic... / FREE
    December 13th, 2011, 14:19 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    Flask-Github description

    Authenticate Flask applications with Github

    Flask-github is a Flask extension for authenticating Flask applications with Github. It also provides support for various other requests to the Github API.

    Installation

    pip install flask-github

    Usage

    An example application is provided. Getting it up and running should be pretty straightforward:

    - Create a new application on Github (or use an existing one)
    - Add the client_id and client_secret to config.json

    - Start the server:

     python example/example.py

    Example App URLs

    Redirect the user to authenticate with Github:

    http://localhost:5000/login

    Check if the user is a member of an organization:

    http://localhost:5000/orgs/< organization_name >

    Check if the user belongs to a certain team:

    http://localhost:5000/teams/< team_id >

    API Requests

    After authenticating, this extension also provides methods for doing GET requests to the Github API as the authenticated user.

    github = GithubAuth(
     client_id='123456789',
     client_secret='987654321',
     session_key='user_id'
    )

    # returns the authenticated user
    github.get_github_user()

    # returns true if the authenticated user is a member of the organization
    github.has_org_access('mindsnacks')


    Options

    - session_key -- Key for the value stored in the session to determine if a user is logged in
    - client_id -- Given by Github when creating an application
    - client_secret -- Given by Github when creating an application


    Product's homepage

    Requirements:

    · Python
    · Flask

      


    TAGS:

    Flask extension | Github authentication | Flask | Github | authentication

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM