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.4.tar.gz
(3.2 kB
view hashes)
Built Distribution
Close
Hashes for sakepedia-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 12130b1de9f074d82ebcff143705be1a945846d7c8edcc269c4a786cbe014c0e |
|
MD5 | 977e14b9afc1daecc304bdb619fcab67 |
|
BLAKE2b-256 | 30aa303699ef86ab7222b59b8c82b77a38521554e5a7af3a832328921dedede5 |