I need to propose a project for a class soon, hence why I'm asking about something I know so little about without doing a ton of research upfront. I would like to build an Apple Watch App. The function of the application that I have in mind is fairly straightforward, but would require the use of an API that is available in a Python version and a Node.js version. Is this possible to integrate calls to the API (in either language) into the watch application's functions, and if so, what does that broadly look like?
EDIT: As pointed, out, I did not include enough info about the API. It is publicly available and hosted on the internet. I'm looking to use the emotion recognition API developed by Deepaffects which can be found at https://developers.deepaffects.com/
Hi all this is just a general question if anyone can help it would be greatly appreciated.
I am creating a website for a college project and i'm using XAMPP to develop the website. I require a Python plugin as I am trying to create an area where the user can type in a python script and the response will be mirrored in an adjacent iframe.
I was going to use mod_python as the plugin but from research into this i have found that this is now dead and will eventually not be supported.
Has anyone got any advice into what I should use because i can not find any relevant information online.
Many thanks Andy Rose
I've already commented, but I'll add a little historical context.
mod_python used to be the defacto standard, at least unofficially, but back in 2003, the Python web-sig's proposal for a formal standard for a Python web interface was published as PEP333, more commonly known as the Python Web Server Gateway Interface, or WSGI.
Since then, mod_wsgi was created to support the new standard, although mod_python can also be used with the appropriate wrappers.
As for which is 'better', that's a subjective question, but mod_wsgi seems to be preferred by the majority of the Python community. For example, Django dropped support for mod_python in 2011.
I intend to use Amazon S3 in my Django project, what's the difference between Amazon's official S3.py and boto.s3? Which one should I use?
I suppose that, by S3.py, you are referring to the code available to download here. So, please correct me if I am wrong.
In this case, IMHO, boto has some advantages, as pointed out at the Getting Started with AWS and Python tutorial:
Bar none, boto is the best way to interface with Amazon Web Services (AWS) when using Python. After all, It has been around for years, has grown up alongside AWS, and is still actively maintained.
Boto also has a good documentation, and an active mail list.
On the other hand, take a look at the last documented update to S3.py, and particularly when it happened:
2007-11-05: Updates to support EU
And this is another thing that got me thinking (remember that Python 3.3.0 beta is out there):
This sample was built using Python 2.2.3.
So, my recommendation is: you should use boto.
I am trying to figure out the difference between Google's GData API ( http://code.google.com/p/gdata-python-client/ ) and Google's APIs Client Library for Python ( http://code.google.com/p/google-api-python-client/ ).
They both seem to be by Google. Which is the official one? How are they different? The second seems to use OAuth primarily.
If anyone has knowledge or experience using either it would be great to get some information about this!
PS: I though about putting this on superuser, but because it is programming related I thought it would be better here.
The difference is the same as the difference between the corresponding Java libraries (http://code.google.com/p/google-api-java-client/ and http://code.google.com/p/gdata-java-client/)
That is, the gdata- version of the code has gone into maintenance mode, probably won't be updated to cover new APIs, but will have bugs fixed as they're found. The google-api- version is under very active development.
There's a good discussion of the pros and cons of each version of the Java api here: http://code.google.com/p/gdata-java-client/wiki/MigratingToGoogleApiJavaClient
The non-java-specific parts of that document also apply to the python api libraries.
These libraries are also intended to support different protocols.
The APIs supported by google-api-python-client are discovery based, while those supported by gdata-python-client use the GData protocol.
I need to write a basic website on Dreamhost. It needs to be done in Python.
I discovered Dreamhost permits me to write .py files, and read them.
Example:
#!/usr/bin/python
print "Content-type: text/html\n\n"
print "hello world"
So now I am looking for a basic framework, or a set of files that has already programmed the whole registration to be able to kick-off the project in a simple way.
By registration I mean the files to register a new account, log in, check the email (sending a mail), and edit the user information. All this possibly using MySQL.
Let me share my own experience with django. My prerequisits:
average knowledge of python
very weak idea of how web works (no js skills, just a bit of css)
my day job is filled with coding in C and I just wanted to try something different,
so there certainly was a passion to learn (I think this is the most important one)
Why I've chosen django:
I've already knew bits and pieces of python
django has excelent documentation, including tutorial, which explained everything
in very clear and simple manner
It is worth to read complete manual first (it took me two or three weekends. I remember I could not remember/understand everything at first pass, but it helped me to learn where
the information can be found when needed. There is also another source of documentaion
called djangobook. Djangobook contains same information as manual, but things are explained more in detail. It's worth to read it also, it helps to catch up with MVC concept, if you have not tried that before.
And finally to answer your question best: there are already also OpenId modules ready for you. I'm considering to use django-authopenid for my new project. It supports OpenId, while providing fallback to locally managed users.
There is certain learning curve if you are going learn django. The more you know about the web and python the steeper the curve is. I had to also learn bits and pieces of javascript and it took me also some time. If you are able to spend full time learning django, then
you can expect you'll be able to deliver first results within 4-6 weeks. It took me 6 months, since I was doing my django studies in free time.
There are several blog entries &c pointing out some problems with Python on Dreamhost and how to work around them to run several web frameworks that could suit you. (Most of the posts are over a year old so it may be that dreamhost has fixed some of the issues since then, of course, but the only way to really find out is to try!-).
Start with this page, dreamhost's own wikipage about Python -- at least you know it's quite current (was last updated earlier today!-). It gives instructions on using virtual env, building a custom Python &c if you absolutely need that, and running WSGI apps -- WSGI is the common underpinning of all modern Python web frameworks, including Django which everybody's recommending but also Pylons &c.
Some notes on running Pylons on Dreamhost are here (but it does look like Dreamhost has since fixed some issues, e.g. flup is now the dreamhost-recommended FCGI layer for WSGI as you'll see at the previously mentioned URL) and links therefrom. If you do go with Pylons, here is the best place to start considering how best to do auth (authentication and authorization) with it. I'm trying to play devil's advocate since everybody else's recommending django, but for a beginner django may in fact be better than pylons (still, spending a day or so lightly researching each main alternative, before you commit to one, is a good investment of your time!-).
For Django, again there's an official dreamhost wiki page and it's pretty thorough -- be sure to read through it and briefly to the other URLs it points to. The contributed auth module is no doubt the best way to do authentication and authorization if you do decide to go with Django.
And, whichever way you do choose -- best of luck!
django framework
You can try starting with django-registration.
EDIT: You can probably hack something up on your own faster than learning Django. However, learning a framework will serve you better. You'll be able to easily ask a large community when you have problems, and build on work that's already been done. And of course, if you're doing something new in the future, your knowledge of the framework can be more easily reapplied.
Django is the way to go. You can try it locally on your PC and see do you like it. It is very nice framework and allows you to quickly build your applications.
If you want to give Django quick go to see how it feels you can download Portable Python where everything is preinstalled and ready to use.
You can also do what you are trying to do with apache module mod_python (which is also used to run Django) but it would require more coding. Your code snippet would work with mod_python (http://www.modpython.org/) right away. I think mod_python comes pre-installed on Dreamhost so you can try it.
For a more complete basic setup (with lots of preprogrammed features) I would point you at Pinax which is a web site on top of Django (which I praise of course, see the dedicated page on dreamhost Wiki at http://wiki.dreamhost.com/Django)
The introduction on the project's web site (pinaxproject.com) :
Pinax is an open-source platform built on the Django Web Framework.
By integrating numerous reusable
Django apps to take care of the things
that many sites have in common, it
lets you focus on what makes your site
different.
There you will have a complete web site to customize and add features to.
I've noticed that a lot of people recommend Django. If you're running on a shared host on Dreamhost, the performance will not be satisfactory.
This is a known issue with Dreamhost shared hosting. I have installed web2py on my Dreamhost shared account and it seems to work okay; search the google groups for an install FAQ.
Later edit: google Dreamhost Django performance for an idea of what I mean.
Another voice to the choir.
Go for django. It's very good and easy to use.