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.0.3.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for sakepedia-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61f7e2fc250d71fbff55019656ac3b51735c801249d03a7e07f258fddd179e68 |
|
MD5 | 60a5ce328e246a6723143059f63094c2 |
|
BLAKE2b-256 | 544ec428c71d70f1b69e29c0c7cbd71414d59e1d58a41f6949d59469bfee5f3b |