未提供项目说明

pygrocydm的Python项目详细描述


皮格罗西姆

Build StatusCodeFactorCoverage StatusPyPIAutomated Release Notes by grenDeepSourceFOSSA Status

安装

pip install pygrocydm

文件

检查Grocy API

https://blueblueblob.github.io/pygrocydm/

使用

导入包:

frompygrocydmimportGrocyAPI

获取grocy data manager实例:

^{pr2}$

或者

gapi=GrocyAPI("https://example.com","GROCY_API_KEY",port=9192,verify_ssl=True)

产品列表(通用实体API)

products=gapi.generic_entities().products()products_list=products.listforproductinproducts_list:print(vars(product))ifproduct.name=="Cookies":product.delete()ifproduct.name=="Chocolate":data={}data['name']="Choco"product.edit(data)else:new_product={}new_product['name']='Cookies'new_product['location_id']=1new_product['qu_id_purchase']=1new_product['qu_id_stock']=1new_product['qu_factor_purchase_to_stock']=1new_product_id=products.add(new_product)

配方API:

recipes_api=gapi.recipes()forrecipeinrecipes_api.fullfilment_list:ifrecipe.recipe_id==5:recipe.add_not_fulfilled_products_to_shoppinglist()else:recipe.consume()recipes_api.refresh()

任务API:

tasks_api=gapi.tasks()fortaskintasks_api.tasks_list:iftask.id==5:task.complete()task.undo()tasks_api.refresh()

系统API:

system_api=gapi.system()last_db_change=system_api.db_changed_time()

许可证

FOSSA Status

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Android上已连接音频输入设备的java列表   java是创建类的新对象还是使用静态方法?   Java:Shift/Rotate对象数组   Java Casting ArrayIterator<Object>   在java中返回布尔值时出错   无法确定文本文件读入程序(java)中的各种元素   Java Swing JToolBar   JAVAlang.IllegalStateException执行Ghost4J(Linux 32对64位)   jvm如何增加ubuntu系统的java堆化?   java CORS策略“AccessControlAllowOrigin”(Anguar 8和Servlet)   使用dagger 2的java视图依赖项注入   单元测试中RxJava的java模拟活动生命周期   arraylist中的Java打印字符串   java返回值显示为0.0。为什么会这样?   java是clientserver应用程序所必需的MVC吗?   ByteToMessageDecoder类中的java内存泄漏   java将大量文档写入firestore   GWT项目中的java TomcatMaven插件。两者之间的区别是什么:org。科德豪斯。魔咒和组织。阿帕奇。公猫maven插件   java swing:向JTree项添加自定义图形按钮