Package: python-wepay
FeaturesMake API calls in a very natural pythonic way, ex:>>>api=WePay(production=False,access_token='STAGE_243...')>>>response=api.account.create("name","description",type='nonprofit')>>>account_id=response['account_id']>>>callback_uri="https://example.com/ipn/account/%s"%account_id>>>response=api.account.modify(account_id,callback_uri=callback_uri)>>>api.preapproval.create("short description","daily",amount=45.5,account_id=account_id){'preapproval_id':619202,'preapproval_uri':'https://stage.wepay.com/api/preapproval/619202'}Validation of all required and optional parameters to each one of the calls.Very easy construction of batch calls, simply by passingbatch_mode=Trueto
a call, ex:>>>call1=api.checkout.create(1234,short_description,type,amount,batch_mode=True)>>>call2=api.withdrawal.find(1235,sort_order='ASC',access_token='access_token_for_other_account',batch_mode=True)>>>response=api.batch.create(client_id,client_secret,[call1,call2])AboutThis package started as a part ofDjango WePay Application, but I soon realized it could be
useful to other developers in Python community that do not useDjango. Originally it meant to be an extension of an
officialPython WePay SDK, but instead
it became a replacement. This package is also listed as athird party Python
SDK on WePay.StatusProduction.RequirementsPython >= 2.7 or >= 3.2Registered Application with WePayproductionsite or
it’sdevelopmentclone.six.requests(optional):mock(optional, for tests only)Installationpip install python-wepayDocumentationhttp://python-wepay.readthedocs.org/en/latest/index.htmlLicenseMIT licensed. See the bundledLICENSEfile for more details.Changelog1.5.0added/account/membership/calls.added/user/mfa/calls.New API version 2015-09-09 changes are reflected in this SDK version:/withrawal/createis deprecated.New API version 2015-08-15 changes are reflected in this SDK version:/account/createnow accepts both old and new style params.removed deprecated call/user/resend_confirmation./accout/createand/account/modifynow acceptcountry_optionsandfee_schedule_slotparamsadded restrictedcredit_card/transfercall.1.4.4renameduser.resend_confirmationcall touser.send_confirmation.1.4.3improved documentation.1.4.0Removed backward compatibility with officialPython WePay SDK.introducedWePayHTTPError, which is a base exception for bothWePayClientErrorandWePayServerErroraddedcached_propertydecorator.changed they way calls are initialized. This change doesn’t affect the way calls are made.1.3.5Fixed and improved error handling, new exceptions:WePayClientErrorandWePayServerError.1.3.4Connectiontimeoutcan be specified on per call basis.1.3.0Python 3 compatibleCalls are made usingrequestslibrary by default (if installed), falls back tourllibifrequestsare not installed or ifWePayis initialized withuse_requests=False.WePayConnectionErroris raised
in case there is a problem connecting to WePay server, ex. timeout.Addition of a full test suit.Minor:‘original_ip’ and ‘original_device’ params are now optional in/credit_card/create.silentmode is more flexible.MovedSubscriptionPlanandSubscriptionChargeto their own modules.MovedWePayWarningover towepay.exceptionsmodule.1.2.0New API version 2014-01-08 changes are reflected in this SDK version:implemented/user/registeranduser/resend_confirmationcalls.added/account/get_update_uriand/account/get_reserve_detailsdepricated/account/add_bank,/account/balance,/account/get_taxand/account/set_taxcalls.restructured SDK in such a way that all API objects are separate classes, so
as an example, if we have a WePay instanceapi = WePay()and we want to
make a/account/findcall, it will look like thisapi.account.find()instead ofapi.account_find()(notice.instead of_), although in
this version both are equivalent, latter one is depricated and will be removed
in version 1.3. Despite these changes lookup calls will be the same, ex.api.account(12345).Added flexibility to use different API version per call basis. So it is now
possible to make a depricated call like this:api.account.balance(1234,api_version='2011-01-15')addedbatch_reference_idkeyword argument to each call that acceptsbatch_mode1.1.2Added required arguments to/credit_card/createcall:original_iporiginal_device1.1.0Added subscription calls:/subscription_plan/subscription/subscription_chargeFew bug and spelling fixes.1.0.0Initial release