Skip to main content

UNOFFICIAL meican command line / sdk

Project description

MeiCan 美餐

PyPI Build

同时支持 Python 3.5+ 与命令行调用的美餐点餐非官方库

山上的朋友! 树上的朋友! 有选择困难症的朋友! 每周都忘记点饭的朋友! 每天都想点同一个套餐的朋友!

:ghost: 懒人们! 快快解放双手来点美餐吧~

背景

最开始是因为我司用的美餐服务, 所以就写了个命令行脚本内部点餐用。

后来发现其实大家会有自己动手实现点单逻辑的需求, 就做成了这个开源库啦。

安装

通过pip:

pip install meican

代码调用

from meican import MeiCan, MeiCanLoginFail, NoOrderAvailable

try:
    meican = MeiCan('username@domain', 'hunter2')  # login
    dishes = meican.list_dishes()
    if any(dish for dish in dishes if dish.name == '香酥鸡腿'):
        print('今天有香酥鸡腿 :happy:')
    else:
        print('今天没有香酥鸡腿 :sad:')
except NoOrderAvailable:
    print('今天没有开放点餐')
except MeiCanLoginFail:
    print('用户名或者密码不正确')

命令行调用

meican  # 查询下次点啥菜
meican -o 香酥  # 点包含 香酥 关键字的菜,比如香酥鸡腿

贡献

不论是任何疑问、想要的功能还是想吃的套餐都欢迎直接提 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

meican-0.4.2.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

meican-0.4.2-py2.py3-none-any.whl (8.8 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file meican-0.4.2.tar.gz.

File metadata

  • Download URL: meican-0.4.2.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for meican-0.4.2.tar.gz
Algorithm Hash digest
SHA256 48f9ea04a7c6b1af4e93c75598a931f0b5037a3ff99468a4bc00a8eb938353e9
MD5 13648f0cc09ac1f821ac5afd2000bf91
BLAKE2b-256 2ebf45dd65656bb85ad47628fc96bcbfc98ab624f1769431cd53d76d03ae5b32

See more details on using hashes here.

File details

Details for the file meican-0.4.2-py2.py3-none-any.whl.

File metadata

  • Download URL: meican-0.4.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6

File hashes

Hashes for meican-0.4.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 576f632c6e110c7e4148686ef04ea421b5d895fc8e7373b295041b1bc469a07e
MD5 4f53482fb81030e2ab4523cc4548028d
BLAKE2b-256 140066d0cff37b8d9a88928fb4192f67185f8f7c2098a0c42cb86ee88f3c538d

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