Package: zaim
zaimPython bindings for the Zaim API.
This also includes a command-line script (zaim).How to install$pipinstallzaimor$gitclonehttps://github.com/hiromu2000/zaim$pythonsetup.pyinstallHow to useFor functions requiring no authentication>>>importzaim>>>api=zaim.Api()>>>api.default_account()For functions requiring authentication>>>importzaim>>>api=zaim.Api(consumer_key='consumer_key',consumer_secret='consumer_secret',access_token='access_token',access_token_secret='access_token_secret')>>>api.verify()>>>response=api.payment(category_id='101',genre_id='10101',amount=1,date='2020-04-01',comment='comment',name='name',place='place',from_account_id=0)>>>api.money(mapping=1,mode='payment',start_date='2020-04-01',end_date='2020-04-01')>>>api.delete(mode='payment',money_id=response['money']['id'])For extended functions>>>importzaim>>>api=zaim.ExtendedApi(consumer_key='consumer_key',consumer_secret='consumer_secret',access_token='access_token',access_token_secret='access_token_secret')>>>response=api.payment(category_id='101',genre_id='10101',amount=1,date='2020-04-01',comment='comment',name='name',place='place',from_account_id=0)>>>api.search(mapping=1,mode='payment',place='place',name='name',comment='comment')>>>api.delete(mode='payment',money_id=response['money']['id'])>>>api.search_category(u'食費')>>>api.search_genre(u'カフェ')>>>api.search_account(u'銀行')How to use the command-line script$exportZAIM_CONSUMER_KEY="YOUR CONSUMER KEY"$exportZAIM_CONSUMER_SECRET="YOUR CONSUMER SECRET"$zaimtoken_get--callback-urihttp://example.com$exportZAIM_CONSUMER_KEY=consumer_key$exportZAIM_CONSUMER_SECRET=consumer_secret$exportZAIM_ACCESS_TOKEN=access_token$exportZAIM_ACCESS_TOKEN_SECRET=access_token_secret$zaimmoney$zaimpayment--category-id101--genre-id10101--amount1--place'place'--date'2020-04-01'--comment'comment'--name'name'$zaimdelete--modepayment--money-idXXXXXXXXXHow to developTest$cd/path/to/zaim$exportPYTHONPATH=$PYTHONPATH:/path/to/zaim/zaim$pythontests/test_zaim_no_auth.py$exportZAIM_CONSUMER_KEY=consumer_key$exportZAIM_CONSUMER_SECRET=consumer_secret$exportZAIM_ACCESS_TOKEN=access_token$exportZAIM_ACCESS_TOKEN_SECRET=access_token_secret$pythontests/test_api.py$pythontests/test_extended_api.pyor simply$sudopipinstalltox$cd/path/to/zaim$exportZAIM_CONSUMER_KEY=consumer_key$exportZAIM_CONSUMER_SECRET=consumer_secret$exportZAIM_ACCESS_TOKEN=access_token$exportZAIM_ACCESS_TOKEN_SECRET=access_token_secret$toxBuild$pythonsetup.pysdist$pythonsetup.pybdist_wheel--universalToDoDocumentation (written in Sphinx (reST) and hosted in readthedocs)Enrich the command-line scriptArgument validation for CLI (e.g., account-id)AcknowledgementsA part of the codes is originally fromhere.CHANGELOG0.2.3 (2019-03-23)Support 3.6 & 3.7 and drop 3.4.0.2.2 (2015-11-15)New FeaturesAdded Create, Update, and Delete operations to the command-line script (zaim).Addedplaceto the list of arguments ofincome.0.2.1 (2015-10-31)New FeaturesAdded all READ operations to the command-line script (zaim).0.2.0 (2015-10-17)New FeaturesAdded command-line script (zaim). It currently only supports token-get, but will support many functions in the zaim API.BugfixesFixed a bug that was affecting Python 3.x: extended_api.py can now import api.py0.1.0 (2015-10-11)New FeaturesAdded Extended API (search,search_category,search_genre,search_account