Skip to main content

unofficial xixiang python sdk

Project description

XiXiang 熙香点餐

PyPI Travis

支持 Python 3.5+ 的熙香点餐非官方库

背景

因为我司点餐的人比较多, 想着加一个点餐服务做灾备, 于是就除了美餐我们还得支持熙香点餐。

安装

pip install xixiang

代码调用

import xixiang

try:
    client = xixiang.XiXiang.login("1881881888", "hunter2")
    menus = client.get_menus()
    shops = client.get_businesses(menus[0])
    dishes = client.get_items(shops[0], menus[0])
    if any(dish for dish in dishes if dish.menu_name == "香酥鸡腿"):
        print("今天有香酥鸡腿 :happy:")
    else:
        print("今天没有香酥鸡腿 :sad:")
except xixiang.XiXiangError as ex:
    print("Error: {}".format(ex))

贡献

不论是任何疑问、想要的功能还是想吃的套餐都欢迎直接提 issue

假如你们公司是用美餐点餐的, 隔壁也有美餐的库噢~

:wink: 欢迎各种 PR

协议

宽松的 MIT 协议:

  • ✔ 支持各种改写
  • ✔ 支持你把代码作者都改成自己
  • ✖ 不支持每天中午免费吃西贝莜面村
  • ✖ 也不支持点大羊腿、掌中宝

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

xixiang-0.2.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

xixiang-0.2.0-py2.py3-none-any.whl (5.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file xixiang-0.2.0.tar.gz.

File metadata

  • Download URL: xixiang-0.2.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for xixiang-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8fefdd67d51797f1282ba045e01f7b559d52b4fcb634fbed02d3bcc3ebe9019d
MD5 827abbb1e1f2599690ed6dea1ce1af7c
BLAKE2b-256 48cbf2aa97485257e5dc501609099603f7557c0985c811b1281b2c514e3c6e56

See more details on using hashes here.

File details

Details for the file xixiang-0.2.0-py2.py3-none-any.whl.

File metadata

  • Download URL: xixiang-0.2.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for xixiang-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1092fcb10210c4fc33e56551f7663ed418fb4c00bf0d4af24829fd4ad9b92e36
MD5 050cc908bd6875fbbf37dbacf746d4de
BLAKE2b-256 67b719177f36cb17800b0269e99c6325d2f7c9b6276dd085c204f314bb3ced68

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page