sakepedia: Sakepedia API
Project description
Sakepedia
SakepediaのAPIをプログラムから利用しやすくするためのPythonSDK
Sakepediaはみんなでつくる日本酒オープンデータです。 Nuxt.js版が以下で稼働しています。
https://sakepedia.code4sake.org/
このサイトのAPIにPythonからアクセスするパッケージです。
機能
- 酒蔵データの取得
- 銘柄データの取得
- 日本酒データの取得、更新、登録
更新および登録には、Sakepediaへのユーザー登録とJWTの発行が必要です。 JWTの有効期限にご注意ください。
使用方法
日本酒データの登録、既にあれば更新
JWT = "JWT issued with your own Sakepedia account"
api = sakepedia.SakepediaAPI(JWT)
sake = sakepedia.SakeData()
sake.brewery = "test brewery"
sake.brand = "test brand"
sake.url = "https://testbrewery.co.jp/testbrand/sake"
sake.name = "test sake bottle"
sake.description = "test description"
res = api.saveSakeData(sake)
パッケージのビルドとアップロード
# pip install twine
# pip install wheel
# rm -rf dist/*
# python setup.py sdist
# python setup.py bdist_wheel
# twine upload --repository testpypi dist/*
# twine upload --repository pypi dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sakepedia-0.1.0.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for sakepedia-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dbfe565ce8ae455760b828f52598f55ac263e25ab49d60753428198b0283b32d |
|
MD5 | 7fc2b7d455b80dcf75b8daed6a977185 |
|
BLAKE2b-256 | 0a809d6a31cd8963a7ed48e2b0ca90033f540f961f1d4f95300bf4db2bf02177 |