Waket Zheng
Waket Zheng
@janusheide Seems that it is not a bug, just use `getattr` instead of .attr The following code snippet worked at my machine (MacOS+Python3.11+tortoise-orm0.20.1) ```py from __future__ import annotations from tortoise...
@Abdeldjalil-H OK, I get it. @janusheide Before the bug fixed, you can do it like this: ```py from __future__ import annotations from tortoise import Tortoise, fields, run_async from tortoise.contrib.pydantic import...
It is better to show the content of `mrp.py` in this issue instead of put it into another link.
写了个简单的Demo,有需要的可以参考一下: ```py #!/usr/bin/env python import shlex import subprocess from pathlib import Path import anyio from celery import Celery from celery.signals import worker_process_init, worker_process_shutdown from tortoise import Tortoise from config import...
`IntField(pk=True)` is auto increment, e.g. `Users` model in [fastapi example](https://tortoise.github.io/examples/fastapi.html#models-py)
Usually, house object would be dump to {'id': 1, 'house_name': 'xx', 'info': 'xx', 'user': {'id': 1, 'name': 'test'}} Examples:: https://github.com/tortoise/tortoise-orm/blob/develop/examples/pydantic/recursive.py https://github.com/tortoise/tortoise-orm/blob/develop/examples/pydantic/tutorial_3.py ```py from tortoise import Tortoise, fields, run_async from tortoise.contrib.pydantic...
https://tortoise.github.io/examples/fastapi.html This example worked with `fastapi-0.95.1` and `tortoise-orm-0.19.3` You may need to describe the bug with detail code @wu-clan
An example for tortoise-orm AbstractAsyncContextManager: async def init_orm() -> None: # pylint: disable=W0612 await Tortoise.init(config=config, config_file=config_file, db_url=db_url, modules=modules) logger.info("Tortoise-ORM started, %s, %s", connections._get_storage(), Tortoise.apps) if generate_schemas: logger.info("Tortoise-ORM generating schema") await...
看起来这个包很久没更新了,我自己拷贝pip安装的源码,修复了一些BUG,更改了类名使其符合pep8规范,有需要的伙伴可到此自提:https://github.com/waketzheng/fastdfs-client-python
@MaKaNu After try a lot, I found that `poetry shell` was able to override variables in Windows. Bash/Zsh/Fish in ubuntu/centos/MacOS are able to reproduce, this is because poetry-dotenv-plugin set variables...