- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for geevee (4.35 sec)
-
docs_src/sql_databases_peewee/sql_app/database.py
from contextvars import ContextVar import peewee DATABASE_NAME = "test.db" db_state_default = {"closed": None, "conn": None, "ctx": None, "transactions": None} db_state = ContextVar("db_state", default=db_state_default.copy()) class PeeweeConnectionState(peewee._ConnectionState): def __init__(self, **kwargs): super().__setattr__("_state", db_state) super().__init__(**kwargs) def __setattr__(self, name, value):
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 662 bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
它可能有一个像`"Arquilian"`(一种业务逻辑)。 当您尝试从您的宠物对象访问它时,ORM 将完成所有工作以从相应的表*所有者那里再获取信息。* 常见的 ORM 例如:Django-ORM(Django 框架的一部分)、SQLAlchemy ORM(SQLAlchemy 的一部分,独立于框架)和 Peewee(独立于框架)等。 在这里,我们将看到如何使用**SQLAlchemy ORM**。 以类似的方式,您也可以使用任何其他 ORM。 !!! tip 在文档中也有一篇使用 Peewee 的等效的文章。 ## 文件结构 对于这些示例,假设您有一个名为的目录`my_super_project`,其中包含一个名为的子目录`sql_app`,其结构如下: ``` . └── sql_app ├── __init__.py ├── crud.py
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri Mar 22 01:42:11 GMT 2024 - 27K bytes - Viewed (0) -
docs/en/docs/release-notes.md
* Fix Peewee `contextvars` handling in docs: [SQL (Relational) Databases with Peewee](https://fastapi.tiangolo.com/advanced/sql-databases-peewee/). PR [#879](https://github.com/tiangolo/fastapi/pull/879).
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Fri May 03 23:25:42 GMT 2024 - 388.1K bytes - Viewed (1) -
docs/en/docs/how-to/sql-databases-peewee.md
If you already have a code base that uses <a href="https://docs.peewee-orm.com/en/latest/" class="external-link" target="_blank">Peewee ORM</a>, you can check here how to use it with **FastAPI**. !!! warning "Python 3.7+ required" You will need Python 3.7 or above to safely use Peewee with FastAPI. ## Peewee for async Peewee was not designed for async frameworks, or with them in mind.
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Tue Jan 16 13:23:25 GMT 2024 - 23.6K bytes - Viewed (1) -
docs/en/mkdocs.yml
- sponsors_badge: ../en/data/sponsors_badge.yml - sponsors: ../en/data/sponsors.yml redirects: redirect_maps: deployment/deta.md: deployment/cloud.md advanced/sql-databases-peewee.md: how-to/sql-databases-peewee.md advanced/async-sql-databases.md: how-to/async-sql-encode-databases.md advanced/nosql-databases.md: how-to/nosql-databases-couchbase.md advanced/graphql.md: how-to/graphql.md
Others - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu May 02 22:37:31 GMT 2024 - 9.1K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/models.py
import peewee from .database import db class User(peewee.Model): email = peewee.CharField(unique=True, index=True) hashed_password = peewee.CharField() is_active = peewee.BooleanField(default=True) class Meta: database = db class Item(peewee.Model): title = peewee.CharField(index=True) description = peewee.CharField(index=True) owner = peewee.ForeignKeyField(User, backref="items")
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Mar 26 19:09:53 GMT 2020 - 465 bytes - Viewed (0) -
docs/em/docs/how-to/sql-databases-peewee.md
!!! note "📡 ℹ" 👆 💪 ✍ 🌅 🔃 🏒 🧍 🔃 🔁 🐍 <a href="https://docs.peewee-orm.com/en/latest/peewee/database.html#async-with-gevent" class="external-link" target="_blank">🩺</a>, <a href="https://github.com/coleifer/peewee/issues/263#issuecomment-517347032" class="external-link" target="_blank">❔</a>, <a href="https://github.com/coleifer/peewee/pull/2072#issuecomment-563215132" class="external-link" target="_blank">🇵🇷</a>. ## 🎏 📱
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 19.2K bytes - Viewed (0) -
docs_src/sql_databases_peewee/sql_app/schemas.py
from typing import Any, List, Union import peewee from pydantic import BaseModel from pydantic.utils import GetterDict class PeeweeGetterDict(GetterDict): def get(self, key: Any, default: Any = None): res = getattr(self._obj, key, default) if isinstance(res, peewee.ModelSelect): return list(res) return res class ItemBase(BaseModel): title: str description: Union[str, None] = None
Python - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 868 bytes - Viewed (0) -
docs/en/docs/tutorial/sql-databases.md
Common ORMs are for example: Django-ORM (part of the Django framework), SQLAlchemy ORM (part of SQLAlchemy, independent of framework) and Peewee (independent of framework), among others. Here we will see how to work with **SQLAlchemy ORM**. In a similar way you could use any other ORM. !!! tip There's an equivalent article using Peewee here in the docs. ## File structure
Plain Text - Registered: Sun May 05 07:19:11 GMT 2024 - Last Modified: Thu Apr 18 19:53:19 GMT 2024 - 29.6K bytes - Viewed (0)