Git Product home page Git Product logo

meican's Introduction

MeiCan 美餐

PyPI Build

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

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

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

背景

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

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

安装

通过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

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

😉 欢迎各种 PR

协议

宽松的 MIT 协议:

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

meican's People

Contributors

cascax avatar ldsink avatar liamchzh avatar lki avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.