Skip to content

Commit 9c53f80

Browse files
authored
Merge branch 'piccolo-orm:master' into composite_index
2 parents bc1c3ae + 1945476 commit 9c53f80

17 files changed

Lines changed: 61 additions & 28 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ Let Piccolo scaffold you an ASGI web app, using Piccolo as the ORM:
9494
piccolo asgi new
9595
```
9696

97-
[Starlette](https://www.starlette.io/), [FastAPI](https://fastapi.tiangolo.com/), [BlackSheep](https://www.neoteroi.dev/blacksheep/), [Litestar](https://litestar.dev/), [Esmerald](https://esmerald.dev/), [Lilya](https://lilya.dev), [Quart](https://quart.palletsprojects.com/en/latest/), [Falcon](https://falconframework.org/) and [Sanic](https://sanic.dev/en/) are currently supported.
97+
[Starlette](https://www.starlette.io/), [FastAPI](https://fastapi.tiangolo.com/), [BlackSheep](https://www.neoteroi.dev/blacksheep/), [Litestar](https://litestar.dev/), [Ravyn](https://www.ravyn.dev/), [Lilya](https://lilya.dev/), [Quart](https://quart.palletsprojects.com/en/latest/), [Falcon](https://falconframework.org/) and [Sanic](https://sanic.dev/en/) are currently supported.
9898

9999
## Piccolo ecosystem
100100

docs/src/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Give me an ASGI web app!
6060
6161
piccolo asgi new
6262
63-
FastAPI, Starlette, BlackSheep, Litestar, Esmerald, Lilya, Quart, Falcon and Sanic
63+
FastAPI, Starlette, BlackSheep, Litestar, Ravyn, Lilya, Quart, Falcon and Sanic
6464
are currently supported, with more coming soon.
6565

6666
----------------------------------------------------------------------------------

docs/src/piccolo/asgi/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Routing frameworks
2222

2323
`Starlette <https://www.starlette.io/>`_, `FastAPI <https://fastapi.tiangolo.com/>`_,
2424
`BlackSheep <https://www.neoteroi.dev/blacksheep/>`_,
25-
`Litestar <https://litestar.dev/>`_, `Esmerald <https://esmerald.dev/>`_,
25+
`Litestar <https://litestar.dev/>`_, `Ravyn <https://www.ravyn.dev/>`_,
2626
`Lilya <https://lilya.dev/>`_,
2727
`Quart <https://quart.palletsprojects.com/en/latest/>`_,
2828
`Falcon <https://falconframework.org/>`_
@@ -31,8 +31,8 @@ and `Sanic <https://sanic.dev/en/>`_ are supported.
3131
Which to use?
3232
=============
3333

34-
All are great choices. FastAPI is built on top of Starlette and Esmerald is built on top of Lilya, so they're
35-
very similar. FastAPI, BlackSheep, Litestar and Esmerald are great if you want to document a REST
34+
All are great choices. FastAPI is built on top of Starlette and Ravyn is built on top of Lilya, so they're
35+
very similar. FastAPI, BlackSheep, Litestar and Ravyn are great if you want to document a REST
3636
API, as they have built-in OpenAPI support.
3737

3838
-------------------------------------------------------------------------------

docs/src/piccolo/query_clauses/on_conflict.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Instead, if we want to update the ``popularity``:
7878
... Band(name="Pythonistas", popularity=1200)
7979
... ).on_conflict(
8080
... action="DO UPDATE",
81+
... target=Band.name,
8182
... values=[Band.popularity]
8283
... )
8384
@@ -93,8 +94,9 @@ If we fetch the data from the database, we'll see that it was updated:
9394

9495
Using the ``target`` argument, we can specify which constraint we're concerned
9596
with. By specifying ``target=Band.name`` we're only concerned with the unique
96-
constraint for the ``band`` column. If you omit the ``target`` argument, then
97-
it works for all constraints on the table.
97+
constraint for the ``band`` column. If you omit the ``target`` argument on
98+
``DO NOTHING`` action, then it works for all constraints on the table. For
99+
``DO UPDATE`` action, ``target`` is mandatory and must be provided.
98100

99101
.. code-block:: python
100102
:emphasize-lines: 5

piccolo/apps/asgi/commands/new.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"fastapi": ["fastapi"],
1515
"blacksheep": ["blacksheep[full]"],
1616
"litestar": ["litestar"],
17-
"esmerald": ["esmerald"],
17+
"ravyn": ["ravyn"],
1818
"lilya": ["lilya"],
1919
"quart": ["quart", "quart_schema"],
2020
"falcon": ["falcon"],

piccolo/apps/asgi/commands/templates/app/_esmerald_app.py.jinja renamed to piccolo/apps/asgi/commands/templates/app/_ravyn_app.py.jinja

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from typing import Any
22
from pathlib import Path
33

4-
from esmerald import (
4+
from ravyn import (
55
APIView,
6-
Esmerald,
6+
Ravyn,
77
Gateway,
88
HTTPException,
99
Include,
@@ -12,7 +12,7 @@ from esmerald import (
1212
post,
1313
put,
1414
)
15-
from esmerald.core.config import StaticFilesConfig
15+
from ravyn.core.config import StaticFilesConfig
1616
from piccolo.engine import engine_finder
1717
from piccolo.utils.pydantic import create_pydantic_model
1818
from piccolo_admin.endpoints import create_admin
@@ -107,7 +107,7 @@ class TaskAPIView(APIView):
107107
await task.remove()
108108

109109

110-
app = Esmerald(
110+
app = Ravyn(
111111
routes=[
112112
Gateway("/", handler=home),
113113
Gateway("/tasks", handler=TaskAPIView),

piccolo/apps/asgi/commands/templates/app/app.py.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
{% include '_blacksheep_app.py.jinja' %}
77
{% elif router == 'litestar' %}
88
{% include '_litestar_app.py.jinja' %}
9-
{% elif router == 'esmerald' %}
10-
{% include '_esmerald_app.py.jinja' %}
9+
{% elif router == 'ravyn' %}
10+
{% include '_ravyn_app.py.jinja' %}
1111
{% elif router == 'lilya' %}
1212
{% include '_lilya_app.py.jinja' %}
1313
{% elif router == 'quart' %}

piccolo/apps/asgi/commands/templates/app/home/_esmerald_endpoints.py.jinja renamed to piccolo/apps/asgi/commands/templates/app/home/_ravyn_endpoints.py.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import os
22

33
import jinja2
4-
from esmerald import Request, Response, get
5-
from esmerald.responses import HTMLResponse
4+
from ravyn import Request, Response, get
5+
from ravyn.responses import HTMLResponse
66

77
ENVIRONMENT = jinja2.Environment(
88
loader=jinja2.FileSystemLoader(

piccolo/apps/asgi/commands/templates/app/home/endpoints.py.jinja

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
{% include '_blacksheep_endpoints.py.jinja' %}
55
{% elif router == 'litestar' %}
66
{% include '_litestar_endpoints.py.jinja' %}
7-
{% elif router == 'esmerald' %}
8-
{% include '_esmerald_endpoints.py.jinja' %}
7+
{% elif router == 'ravyn' %}
8+
{% include '_ravyn_endpoints.py.jinja' %}
99
{% elif router == 'lilya' %}
1010
{% include '_lilya_endpoints.py.jinja' %}
1111
{% elif router == 'quart' %}

piccolo/apps/asgi/commands/templates/app/home/templates/home.html.jinja_raw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<li><a href="/admin/">Admin</a></li>
5757
<li><a href="/schema/swagger">Swagger API</a></li>
5858
</ul>
59-
<h3>Esmerald</h3>
59+
<h3>Ravyn</h3>
6060
<ul>
6161
<li><a href="/admin/">Admin</a></li>
6262
<li><a href="/docs/swagger">Swagger API</a></li>

0 commit comments

Comments
 (0)