Quantcast
Channel: Blog – Stormpath User Identity API
Viewing all articles
Browse latest Browse all 278

Our Python SDK : Out of Beta and Ready For Production!

$
0
0

Zen of Python

Since the release of some much needed Python SDK improvements back in October of 2013, we’ve been hard at work rolling our V1, production-ready Python SDK release. I’m extremely happy to announce that as of today, our brand new Python SDK is finally live! You can check it out on PyPI: https://pypi.python.org/pypi/stormpath

So what’s new in stormpath-1.0.0? Several big things.

Custom Data

If you’ve ever wanted to store variable data alongside your user accounts and groups, now you can! The new Python SDK release adds full support for Stormpath’s CustomData resource, which means you no longer need a users table for your applications.

The interface is simple and intuitive for Pythonistas. Take, for example, the below code sample. What we’re doing here is storing a user’s birthday, gender, and favorite color in the user’s account for later retrieval -- simple!

>>> user_account.custom_data[‘birthday’] = ‘06/28/1988’
>>> user_account.custom_data[‘gender’] = ‘male’
>>> user_account.custom_data[‘favorite_color’] = ‘black’
>>> user_account.custom_data.save()
>>> print user_account.custom_data[‘gender’]
'male'

NOTE: CustomData is only persisted when .save() is called.

As you can see above, you can work with Python’s native dictionary interface to store and retrieve custom data quickly and easily. Our Python SDK lazily loads data as well, so we’ll only fetch the user’s data when needed, and not a moment sooner.

New PyPI Package Name

In order to comply with Python best practices, we’ve also renamed our PyPI package from ‘stormpath-sdk’ to ‘stormpath’. This means installing our package is now more intuitive than ever -- simply run ‘pip install stormpath’ on the command line, and you’ll be ready to go in seconds.

Furthermore, to support this change we’ve updated our legacy PyPI package information, redirecting users to the package’s new homepage.

Major Internal Styling Revamp

Before our 1.0 release, we decided to spend a bit of time polishing up our internal library code. If you browse our source code, you’ll now see that everything is fully PEP-8 compliant, cleanly commented, and well tested.

We’ve also renamed several internal resources to maintain consistent naming conventions project-wide, which ensures that developers wanting to contribute to the official Stormpath Python SDK will have a pleasant time.

Revised Quickstart

Getting started with the Stormpath Python SDK has never been easier. If you’re already familiar with Stormpath, head over to our GitHub walkthrough (https://github.com/stormpath/stormpath-sdk-python) and you’ll be making requests in no time at all.

Our new Quickstart documentation walks you through many of the SDKs features, including (among other things):

  • Creating a reusable Client object.
  • Creating an application.
  • Creating a directory.
  • Creating user accounts.
  • Authenticating user accounts securely.
  • Adding data to a user account with CustomData.
  • Removing accounts.
  • Resetting a user’s password.
  • Handling ACL with Groups.
  • How to contribute to the project. (It’s easy to get started!)

Feedback

Got any questions about the new SDK? See something missing that you’d like added? We’re always available to help! https://support.stormpath.com/home

We love getting feedback, comments, and suggestions: it’s how we make the service better.


Viewing all articles
Browse latest Browse all 278

Trending Articles