Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install jmbo-neo

How to install jmbo-neo

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install jmbo-neo
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.4.3 Available View build log
 
License
BSD
Lastest release
version 0.4.3 on Jan 9th, 2014

jmbo-neo

jmbo-neo provides integration with Neo Web Services for jmbo and jmbo-foundry. It syncs jmbo-foundry's Member objects with consumers in the Neo data hubs. Syncing refers to the creation, modification and deactivation of Neo consumers as Member objects are created, modified and deactivated.

Authentication-related actions are also performed via Neo Web Services. These include logging in and out and changing passwords. jmbo-neo also supports a number of other Neo API calls. These, in addition to the above mentioned, can be invoked as necessary in other jmbo apps.

Requirements
System libraries
  • libxml2-dev
  • libxslt-dev
Python packages
  • python-lxml
  • requests

jmbo-neo uses generateDS.py (http://cutter.rexx.com/~dkuhlman/generateDS.html) to generate Python classes from Neo XML schemas.

Usage

neo.api contains functions for all the supported Neo API calls. Consumer calls require either a consumer ID or consumer object (or both). If a consumer has been created for a particular Member, a corresponding NeoProfile object will be stored in the database. So to obtain the consumer ID, use neo.models.NeoProfile(user=member.id).consumer_id.

A consumer object is an instance of neo.xml.Consumer. Consumer should not be instantiated directly. Internally, jmbo-neo uses neo.xml.parseString(response.content) to create a consumer object from the XML return by Neo Web Services. This object will be returned when calling, for instance, neo.api.get_consumer. To access this consumer object, you should use the wrapper class neo.utils.ConsumerWrapper. It has all the necessary getter and setter methods to correctly manipulate the consumer object, ensuring the resulting XML is valid.

When using jmbo-neo, all non-required Member fields will be null, or set to their default values. Queries on Member objects will return incorrect results.

Settings

The following settings must be added to settings.py:

NEO = {
    'URL': 'neowebservices.com/service/'
    'APP_ID': '1',
    'VERSION_ID': '1.3',
    'PROMO_CODE': 'testPromo',  # if there is a single promo code for the website
    'BRAND_ID': 35,  # if there is a single brand for the website
    'PASSWORD': 'password',  # http basic auth password
}

AUTHENTICATION_BACKENDS = ('neo.backends.NeoBackend',)

System Message: WARNING/2 (<string>, line 55)

Literal block ends without a blank line; unexpected unindent.

Authors

Praekelt Foundation
  • Rizmari VersfeldChangelog

System Message: WARNING/2 (<string>, line 62)

Bullet list ends without a blank line; unexpected unindent.

0.4.3 (18-06-2013)
  1. Don't create consumer on member load - issue for views with many members and unmigrated accounts.
0.4.2 (14-06-2013)
  1. Normalize login_alias, removing bad characters and padding it.
  2. Add a validation module with validators for email, mobile_number and login_alias - to be expanded.
  3. Fix error on user_logged_out if there is no authenticated user.
0.4.1 (06-06-2013)
  1. Only clean via Neo if no local errors in join form.
0.4 (23-05-2013)
  1. Use random password for Neo auth instead of actual user password.
  2. Only Member.full_clean throws ValidationError, not Member.save anymore.
  3. Remove auth backend and middleware. The user's plain text password isn't stashed in the session or on the member object anymore.
  4. Add created field to NeoProfile - useful for checking consumer creation limit (10 000 per day at the moment).
  5. Reduce test time by re-using an immutable member where possible.
0.3 (03-05-2013)
  1. Add a new management command to export members for bulk upload: members_to_cidb_dataloadtool
  2. Automatically create consumers on CIDB for members on login.
  3. Consumer creation deferred until a member is complete according to RegistrationPreferences.required_fields.
  4. Consumer fields are kept in sync with member fields over MCAL.
  5. Use login_alias instead of Member.username for CIDB communications.
0.2 (09-11-2012)
  1. Create member if credentials are valid and the member does not exist.
  2. Fix bug in logout.
0.1 (18-10-2012)
  1. Initial release

Subscribe to package updates

Last updated Jan 9th, 2014

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.