Skip to main content
# MeiCan 美餐点菜
[![PyPI](https://img.shields.io/pypi/v/meican.svg)](https://pypi.python.org/pypi/meican)
[![Travis](https://img.shields.io/travis/hui-z/meican.svg)](https://travis-ci.org/hui-z/meican)

**非官方的Python包,支持命令行调用。**

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

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


## 代码调用(推荐)

通过pip安装:

```bash
pip install meican
```

样例Python代码(想实现更多操作请读源码):

```python
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('用户名或者密码不正确')
```


## 命令行调用

```bash
git clone git@github.com:hui-z/meican.git ~/.meican && cd ~/.meican && pip install -r requirements.txt # 用git把项目克隆到本地并且安装项目依赖
alias meican="python ~/.meican/meican/cmdline.py"
```

装好以后,
就可以直接通过命令行调用了~

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


## 版权、魔改、利益相关等

最开始是因为[我司](http://www.kezaihui.com/#!/join)用的美餐服务,所以就写个简单脚本内部点餐用。

License 就是宽松的 MIT 协议,欢迎各种 Fork + PR.

由于每家公司的美餐服务会有不同,所以可以看看 [wujiyu115](https://github.com/wujiyu115/meican) 的实现。

:wink: 最后欢迎各种 PR

Release files for meican 0.2.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for meican 0.2.5
File Interpreter ABI Platform
meican-0.2.5-py2.py3-none-any.whl Python 2, Python 3 none any Details

Release files / meican-0.2.5-py2.py3-none-any.whl

Download URL meican-0.2.5-py2.py3-none-any.whl
Size 10.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
bdec3db57cb39ee6ddb3110ee965ce16940c952715b61c992238b46e1c50fdd6
BLAKE2b-256 checksum
How to use checksums
5a61de1b44a9f3282b17e945703d5f3a22ce96bf07a33554ffc049ba9a9828d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.7

1 release file

0.2.6

1 release file

This release

0.2.5 This release

1 release file

0.2.4

2 release files

0.2.2

3 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.2

3 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page