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.1.tar.gz
(4.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sakepedia-0.1.1.tar.gz.
File metadata
- Download URL: sakepedia-0.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3420623075c3cacfc20a5bd63d34092a5ffb1879d1f85fc677c8531c9ba0859a
|
|
| MD5 |
bb495c6e0c39c11d998509a1b20efec0
|
|
| BLAKE2b-256 |
0ec0f08c5d534735f09207dd540035c845b336d6e699f09a4190bafc854abdd3
|
File details
Details for the file sakepedia-0.1.1-py3-none-any.whl.
File metadata
- Download URL: sakepedia-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efbbb9ed722fe3f368071aec9b3f704296251ce050b8876e4bc24b3e66c93c64
|
|
| MD5 |
afe5e72fe9afe5f019bab2a312c1e52b
|
|
| BLAKE2b-256 |
173ee24fcd6d93fc081bef7d62d2bc6f9f94ff380ef5249bf19cd5e5c2e3fad7
|