Archive for the ‘Python’ Category

Customer Spotlight: Zapier

Friday, December 16th, 2011

We are excited to feature Zapier on this week’s Tropo Customer Spotlight! Today I sat down with Wade Foster, one of the co-founders of Zapier, to discuss their business and learn more about how they are using Tropo for their Instant Messaging services.

What is Zapier?

Zapier allows you to “zap your apps!” You can build unique integrations between your favorite applications, one mouse click at a time without writing a single line of code!

  • Own Your Data: Zapier makes it easy to import and export data automagically with your favorite web apps. Don’t get locked in.
  • No Data Entry: Quit filling out the same information between different applications, and let Zapier do the heavy lifting for you.
  • Fill-in Missing Features: Never be at the mercy of vendors to build features or integrations. Use Zapier to add missing functionality.

Zapier uses Python, Django, and the Tropo Scripting API to deliver Instant Messaging services to users on AIM, GTalk, MSN, and Yahoo!

To learn more about Zapier, visit their website at http://zapier.com!

Here is a screencast of Zapier using Tropo for their Instant Messaging services:

LA .NET Hackathon 2011

Monday, December 5th, 2011

Tropo is partnering with the LA .NET Developers Group and Outlook Amusements to sponsor this weekend’s LA (Burbank) Hackathon at Outlook Amusements on Saturday, December 10, 2011 from 9:00 AM to 6:30 PM (PT).

Here’s the address: Outlook Amusements 2900 W. Alameda Ave suite 400 Burbank, CA 91505

The theme of the LA Hackathon is “Build Voice/SMS apps for Holidays”! Here are a few ideas to get you thinking:

  • Santa Caller (similar to http://santacall.us) – Build a website that allows a parent to schedule a call to their kids from Santa. Have Santa ask the kid what they would like for Christmas and then email the parents their kid’s recorded message and/or transcribe the message for the email.
  • Santa Tag (similar to http://www.bloggingbistro.com/jc-penney-comes-up-with-a-new-use-for-qr-codes-video/) – Build a website that calls someone to record a message then associates the message with a QR code that plays when scanned.
  • Holiday Greetings Hotline – Build a holiday greetings hot line where user can leave a voice message that will be transcribed into text and posted to “Holiday Greetings” twitter account.

Even though this event is sponsored by the .NET Developers Group, we will be supporting all development languages and will have Tropo expertise onsite in .NET, PHP, Ruby/Rails, and Javascript, and Node.JS!

Register today!

Customer Spotlight: FetchNotes

Friday, November 4th, 2011

We finally got a chance to catch up with the guys (@_chaselee and @alexschiff) behind the popular new notes service called FetchNotes!

What makes FetchNotes so cool? For one, it has a super simple web UI. The entire site behaves like an app and leverages Python’s Tornado Webserver and AJAX to add and tag notes without lifting your fingers from the keyboard. Tags are basically hashtagged keywords in the note that allow the app to categorize notes by topic.

Secondly, FetchNotes leverages Tropo to deliver a truly multichannel communications experience. Today FetchNotes extensively leverages Tropo’s SMS services but the team has already started working on adding Tropo’s Voice with transcription service as well as Tropo’s Instant Messaging services on all of the IM networks including: GTalk, Yahoo!, MSN, AOL, and Jabber! We may even see support in the near future for in-browser, voice-powered note taking using Tropo’s Javascript Phone API, Phono.

Thirdly, Chase and Alex are working to add groups and third-party integration into other services such as GitHub or Google Calendar. This would allow developers, testers, and users to take a note about a #feature or #bug and tag it accordingly and watch the note get pushed to other services as GitHub issues or even calendar entries on Google!

The FetchNotes service is still in private beta but the first 50 new subscribers that click on fetchnotes.com/invite/tropo will be allowed to register for the service and check out the new coolness first hand!

New Fax Library for Pythonistas

Thursday, September 22nd, 2011

Remember the post we did earlier this year with the Ruby gem written by Jason Goecke called pamfaxr for sending and receiving faxes? Well we are excited to announce that there is a new Python library by Jonathan Sweemer to do the same thing! Here’s the source code on GitHub too!

2 Lines of Code To Enable Calling 1 Phone Number And Ringing Multiple Phone Numbers (like Google Voice)

Monday, July 18th, 2011
Phone Home

Have you ever wanted to give out a single phone number that in turn dials multiple phone numbers? And whichever phone answers first speaks to the caller?

I had just this case recently when I wanted a phone number I could start putting on Voxeo news releases that would ring my multiple phones and also could conceivably also ring someone else’s phone number. The number is also not tied to a single person so that if someone else started handling press inquiries, the number could just be redirected to the other person’s phone number(s). (In the programming world, we would call this an “abstraction layer”.)

Here’s literally all you have to do in Tropo Scripting (outside of having a free developer account at Tropo.com)… it’s really just one line of code using the transfer command and provide an array of phone numbers to call. Here’s how it looks in python, my language of choice:

say("Please wait while we connect your call.")
transfer(["+14079678424","+16037566424","+14074555859"], {
    "playvalue":"http://www.phono.com/audio/holdmusic.mp3"})

All I had to do was:

  • login to Tropo.com
  • create a new application
  • create a new hosted file
  • copy / paste this code in and change the phone numbers
  • save the hosted file
  • save the application
  • add a new phone number to the application
  • wait a minute or two and start calling!

That’s literally it.

If python isn’t your thing, you scroll down the documentation page for the transfer command and see examples in JavaScript, Ruby, Groovy and PHP. They are all basically the same simple solution.

Now, what’s cool about Tropo is that because Tropo can work with IP communications / unified communications systems, I can tell the transfer command to also use a SIP address as one of the endpoints to call:

say("Please wait while we connect your call.")
transfer(["+14079678424","+16037566424","sip:dyork@corpsip.voxeo.com"], {
    "playvalue":"http://www.phono.com/audio/holdmusic.mp3"})

This simple version works really well… but I can make a few other changes to it. Here’s a version that:

  • speaks with a different text-to-speech voice
  • provides an option for the caller to cancel the call (although they could of course just hang up)
  • covers the error condition of no one answering any of the phone numbers

The code is:

say("Please wait while we connect your call. Press star to cancel the call.",
    {"voice":"simon"})
transfer(["+14079678424","+16037566424","sip:dyork@corpsip.voxeo.com"], {
    "playvalue":"http://www.phono.com/audio/holdmusic.mp3", 
    "terminator": "*",
    "onTimeout": lambda event : say("I'm sorry, but nobody answered.")})

That’s it! Short and simple… and able to ring all the phones you want.

What’s also great is that I can add more phone numbers to this application on the inbound side so that I could in fact have a phone number in the UK or 40 other countries that call into this application… and then are transferred out to whichever phone I want to take the call on.

P.S. Sure, you can do this with services like Google Voice, but there are limits with some of those services. For instance, a Google Voice number is tied to your Google Account, so you may need to create another Google Account if you want a new Google Voice number. And while yes, you can add another number to your GV account for $20, it’s still tied to that one account. With Tropo, you can make as many of these type of applications as you want…

Hello, Python World (Django Edition)

Sunday, May 29th, 2011

I’ve been doing my Python Tropo development on top of Google App Engine, for the past couple of years. Out of the box, App Engine uses the webapp framework. But for my current “Hello, World” project, I decided to leave my App Engine comfort zone, and gain a different perspective. I took up the task of writing a “Hello, World”, Tropo Web API app, using the Django framework for Python.

(more…)

Updated Version of the Python Module for the Tropo WebAPI

Friday, April 29th, 2011

Python logoFor you pythonistas out there, I merged in some changes today to the “tropo-webapi-python” module. My colleague Justin Dupree found and fixed an error where the “on” object was not included as an available option. With this fixed you can now send in events using the ‘on’ object.

To get the updated tropo-webapi-python library, you can download it (or git clone it) from:

https://github.com/tropo/tropo-webapi-python

… and if you already have a local clone of the git repo, odds are that you know how to update it ;-)

Alternatively you can also grab it from the PyPi repository:

http://pypi.python.org/pypi/tropo-webapi-python/

Thanks to Justin for the fix and thanks to other pythonistas who have reported issues. Speaking of that, if you do find any issues with the library, please report them to the “Issues” area on Github. Many thanks… and please let us know how else we can help you build awesome python apps using Tropo!

Hey, Pythonistas! Tropo Just Got Upgraded To The Latest Jython

Wednesday, March 23rd, 2011

Python logoIf you like to create communications apps in python, as I do, we’ve got some great news for you… Tropo Scripting just got updated to the latest version 2.5.2 of Jython. What this means for you is that if you ever found that one of the python apps you uploaded to Tropo Scripting wouldn’t run because it needed one of the newer “standard” python libraries, you now have access to the latest that is available to us.

You can find out about what is in jython 2.5.2 at:

http://www.jython.org/docs/whatsnew/2.5.html

And the list of standard supported libraries is at:

http://www.jython.org/docs/library/indexprogress.html

(Note that not all of these libraries may be supported within Tropo’s cloud environment.)

You may or may not be aware, but the Tropo Scripting cloud uses the JSR 223 Scripting framework for Java to support the languages of Ruby, python, PHP, Groovy and JavaScript. For python this means that Tropo uses Jython, which only recently moved to 2.5.2, supporting most all of the features in regular python 2.5.

Among many other enhancements, the Jython team also indicates that Jython 2.5.2 includes a significant performance increase.

So what are you waiting for? Sign in to Tropo (or register for a free account), check out our tutorials and quickstart examples and start building voice, SMS, IM and Twitter apps today!

P.S. And if you want to access standard libraries found in the even newer python 2.6, 2.7 or 3.x – or if you want to use your own custom libraries or modules, you can simply run the application on your webserver instead of hosted in the Tropo cloud and use the Tropo WebAPI… we’ve even created a library, tropo-webapi-python to make that easy for you.

Tropo Powers PennApps Mobile Winner

Friday, January 28th, 2011

The recent PennApps Mobile competition, held at the University of Pennsylvania on January 14th through the 16th, brought together teams of students to work on the next generation of mobile applications.

Tropo was proud to be a sponsor of this event, and equally proud to see one of the event standouts use the Tropo platform.

A team of four Penn Computer Science Students (Lu Chen, Matt Croop, Gary Menezes and Ryan Menezes) used Tropo to build the Decider, one of the winners of the PennApps event with an interesting take on the contest theme – Serendipity.

We talked with the team to find out more about their project, and why they selected Tropo.

Briefly describe your project – what is it, what does it do?

What should we do tonight: watch a movie or play board games? Should I pull an all-nighter or get some sleep? These five desserts on the menu all look delicious… Which one should I order?

Instead of flipping a coin, why not let a stranger decide?

We used Tropo to build the Decider, which anonymously sends your question to a randomly chosen stranger who decides for you. You can send questions over SMS and IM, or with our Android app.

What technologies does your project use?

Decider is written in Python, hosted on Google App Engine, and reliant on Tropo’s WebAPI library for all of its SMS and IM needs. The Android app is built with Java.

Explain your decision to use the Tropo platform. Why did you choose Tropo?

We first considered Tropo because the demo given at the event convinced us that using it would be simple and free. A big bonus was the ability to seamlessly tie in IM: our original intent was to just handle SMS, but adding IM support was effortless.

Finally, Tropo’s scripting made it easy to quickly debug and test, while WebAPI gave us a lot of flexibility in choosing a backend.

What did you like best about using Tropo?

Tropo made it terrifically easy to get started. Even though we had no experience with messaging technologies, it took our team of four less than 6 hours to sign up, learn WebAPI, deploy an app, and test it over chat and sms. The docs and sample code were excellent.

What are your future plans? Any plans to take the project to a wider audience?

Right now, we still think of the Decider as a fun experiment — we aren’t actively searching for users, but we’ll definitely keep it up to speed as more people join.

This smart, talented bunch has a bright future.

We at Tropo wish them the best of luck in all their future endeavors and hope that our paths cross again soon.

Python Tropo WebAPI Library Now Available in PyPI for Easy Installation

Wednesday, January 5th, 2011

Python logoI’m pleased to announce that we’ve made it even easier for people to install the Tropo WebAPI library for python. (This lets you build apps that are hosted on your local system that communicate with Tropo for voice/SMS/IM/Twitter connectivity.)

Last night I uploaded the module to PyPI, the python package index, and as a result you can now simply type this command to install the latest version:

easy_install tropo-webapi-python

This assumes, of course, that you have the setuptools package installed, but that should be available in most python installations. (And if you don’t have it, you can get setuptools from PyPI and follow the instructions there.)

Alternatively, if you prefer to use the newer pip replacement for easy_install, you can type this command:

pip install tropo-webapi-python

(And pip is also available from PyPI if you want to trying using it versus easy_install.)

If you want to see the PyPI page describing the Tropo WebAPI library, it is at:

http://pypi.python.org/pypi/tropo-webapi-python/0.1.0

We’ll make sure to upload a new version after there have been any real changes to the python library. The definitive source will of course always be at the tropo-webapi-python Github page, but we’ll aim to make sure that the PyPI version tracks closely.

Many thanks to developer Randall Degges who raised an issue on Github asking if we could upload the library to PyPI. Thanks, Randall, for the suggestion!

P.S. Feel free to raise issues on Github with your suggestions (or fixes), too!