UNOFFICIAL meican command line / sdk
Project description
# MeiCan 美餐
[![PyPI](https://img.shields.io/pypi/v/meican.svg)](https://pypi-hypernode.com/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
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
meican # 查询下次点啥菜
meican -o 香酥 # 点包含 香酥 关键字的菜,比如香酥鸡腿
```
## 其它
最开始是因为[我司](http://www.kezaihui.com/#!/join)用的美餐服务,所以就写个简单脚本内部点餐用。
License 就是宽松的 MIT 协议,欢迎各种 Fork + PR.
各家美餐服务都有不同,也欢迎看看 [wujiyu115](https://github.com/wujiyu115/meican) 的实现。
:wink: 最后欢迎各种 PR
[![PyPI](https://img.shields.io/pypi/v/meican.svg)](https://pypi-hypernode.com/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
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
meican # 查询下次点啥菜
meican -o 香酥 # 点包含 香酥 关键字的菜,比如香酥鸡腿
```
## 其它
最开始是因为[我司](http://www.kezaihui.com/#!/join)用的美餐服务,所以就写个简单脚本内部点餐用。
License 就是宽松的 MIT 协议,欢迎各种 Fork + PR.
各家美餐服务都有不同,也欢迎看看 [wujiyu115](https://github.com/wujiyu115/meican) 的实现。
:wink: 最后欢迎各种 PR
Project details
Release history Release notifications | RSS feed
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.3.0.tar.gz
(6.0 kB
view details)
Built Distribution
File details
Details for the file meican-0.3.0.tar.gz
.
File metadata
- Download URL: meican-0.3.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf84749dd5cd2cdea940c129741e51baae6f52e6e8ce2a13b983f05c2ce850de |
|
MD5 | a760ac602bd495e117973a0fa2f98410 |
|
BLAKE2b-256 | a10420f5c183076d8721631ad514d0d02e1361883327cac0375ec707f30162e6 |
File details
Details for the file meican-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: meican-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: Python-urllib/3.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7137d5106ecfd069b7d24707f6b0a7d459a3fd779034ffff5b0a7c84fc35ad6a |
|
MD5 | 249a540781217b40d2d6e19cafefbd15 |
|
BLAKE2b-256 | 956ce792367b945d14b847f357308f6a9294908f98827ea52bea381071e27087 |