OAuth 2.0 Tutorial? [closed] - python

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm writing a REST web service on twisted and I want to use OAuth 2.0 for authorization. Is there a tutorial out there to help me write the OAuth server without having to read the entire spec? I know it's in draft, but even Facebook is using it.

Edit for 2012: Try Google OAuth 2 playground at https://code.google.com/oauthplayground for a practical demo. It will allow you to see working requests.
There aren't any good, generic OAuth 2 tutorials. Obviously the IETF spec, like any engineering spec, is designed to be specific and verbose rather than short and simple.
Additionally many other oAuth 2 documents are diffs of oAuth 1, which is a horrible way to try and learn something.
I find Google's own (Google-specific) oAuth 2 documents relatively good to get an understanding of how it practically works - what's sent, in what request, to whom:
https://developers.google.com/oauthplayground/

FWIW, I have an example project here using django and piston with oauth2: https://bitbucket.org/justinfx/django-piston-oauth2-nonrel-example

OAuth ends up being so simple, there's really no need for a library. It boils down to using HTTPS and passing the correct POST parameters as specified in the draft: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-v2-10

Related

Where to learn Pyramid by following practical examples? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
From the official website there's only things like "hello world" and a todo-list. Apparently Pyramid doesn't seem to be mainstream enough to spawn sufficient example tutorials, and I'm the kind of person that finds it more efficient to learn by following various sample projects. I think my Google-fu is not strong enough...
I'm actually pretty much brand new to back-end in general, so it would be even more helpful if someone can show me a variety of small and practical tutorials of how a Python backend works with Pyramid, all the way from setting up the configuration accordingly, passing data back and forth from the client side, and how data from the backend is hooked to the frontend template.
Thanks!
There are official tutorials supported by the Pylons Project.
http://docs.pylonsproject.org/projects/pyramid/en/latest/#tutorials
http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/index.html
There are community contributed tutorials as well, where the list of them is officially curated by the Pylons Project, but the tutorials themselves may not be official.
http://docs.pylonsproject.org/projects/pyramid-tutorials/en/latest/index.html#pyramid-tutorials
Pyramid projects:
Tutorias
Pyramid Bloggr tutorial: https://github.com/Pylons/pyramid_blogr
Heavy weight
Warehouse (the next generation Python package index in development): https://github.com/pypa/warehouse
Kotti CMS: https://github.com/Kotti/Kotti
Substance D CMS: http://www.substanced.net/

Implementing web APIs with versions in python [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am implementing a simple web application with python (3.x) and bottle. As the APIs I want to expose might change in the future, I would like to add the possibility to have different versions.
On this topic there are some insightful answers here, but unless versioning for web APIs is a proven bad idea I'd like to give it a try anyways.
Regarding my app: for example, while version 1.0 allows the following call through a POST /resource:
#post('/resource')
post_item(name=item_name, value=item_value)
a future version might do:
#post('/resource')
post_item(name=item_name, value=item_value, fullname=longer_item_name)
For simplicity assume the keyword parameters 'name', 'value', 'fullname' come from the FROM data fields:
<input name="name" type="text" />
Now, the first thing that comes to mind is inserting a version parameter at the beginning, something similar to what IP is doing with its headers:
post_item(v=1, name=item_name, value=item_value)
post_item(v=2, name=item_name, value=item_value, fullname=longer_item_name)
However, it seems a bit cumbersome. Is there any web micro-framework library that helps with this? Am I falling outside what a micro framework does?
It's definitely not a proven bad idea, more like a proven necessity. The issue is that there's very little agreement on the best way to handle it (beyond agreement at a high-level on URI-based approaches).
Apigee have some good articles on API versioning strategy here:
https://blog.apigee.com/taglist/versioning
Here's a good overview of how popular APIs handle versioning, along with some more resources that discuss versioning strategy:
http://www.lexicalscope.com/blog/2012/03/12/how-are-rest-apis-versioned/

replacement of the python facebook API? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
as stated in bug #17429, official support for the python api is ending, does anyone know of a up-to-date facebook api for python? or should I look for another language or web framework?
[...] does anyone know of a up-to-date facebook api for python?
Facepy might be what you're looking for.
According to that ticket support for SDK ends. The whole facebook API is language/technology agnostic and just a regular OAuth-based RESTful one
While I develop Facebook apps in PHP (still supported), I switched to mainly using the javascript SDK. I think it's a better user experience and Facebook automatically upgrades it when they change the rules. Which seems quite often. Typically, there isn't any change required in your javascript code.
Django Facebook is mature:
https://github.com/tschellenbach/Django-facebook
There's nothing language/framework agnostic about the facebook API.
The open graph api has it's own syntax.
Oauth takes care of authentication, but you still need to convert the output data to something your app can work with.

Where can I find a good mwclient introduction? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I'm just starting with mwclient. I'm going to create bots to query our MediaWiki database and make small revisions.
But I cannot find anywhere a simple list of python commands like how to get ages of pages, contents of categories, contents of pages, etc.
Does anyone know a good starters resource?
The official docs at https://github.com/mwclient/mwclient/wiki have some introductory tutorials. I'm in charge for documentation for mwclient but haven't had enough time to really expand them - could use help from anyone who is willing.
One of my colleagues just sent me a link to the MediaWiki API wiki page.
I currently use python+urllib for API queries, and mwclient whenever I need to edit/create a page.
An useful place to get started with mwclient (read/edit/create a page):
http://brianna.modernthings.org/article/134/write-api-enabled-on-wikimedia-sites
The Bot Manual also has tons of good info and links, e.g. creating a bot.

Is there any libraries could import contacts from hotmail/live/aol account? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I've import contacts from gmail by using gdata api,
and is there any apis like that for hotmail/live/Aol ?
There is Windows Live Contact API for Hotmail/Live mail.
Yahoo Contact API for Yahoo also exists, but to this date, no AOL contact api.
I would suggest you try openinviter (openinviter.com) to import contacts. Unfortunately, you will not have OAuth capabilities, but it is the best class out there and works with 90+ different email providers.
Note: it is written in php, but creating a wrapper won't be too hard.
If you are able to export from them to the standard vCard format, you can read and process vCard data using the vobject package.
Hotmail/Live
There is Windows Live Contact API for Hotmail/Live mail, which is similar to GData API.
AOL
As far as I remember AOL doesn't provide API to access its address book, however they working on it (for long time)...

Categories