Skip to content

Commit 2698bb8

Browse files
committed
update docs
1 parent bd4fc1a commit 2698bb8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ from fastapi import FastAPI, Request
9494
app = FastAPI()
9595

9696
# Add Function registry to the application state
97-
app.state.function_catalog = FunctionRegistry()
97+
app.state.timvt_function_catalog = FunctionRegistry()
9898

9999
# Register Start/Stop application event handler to setup/stop the database connection
100100
# and populate `app.state.table_catalog`

docs/src/function_layers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ from fastapi import FastAPI, Request
5757
app = FastAPI()
5858

5959
# Add Function registery to the application state
60-
app.state.function_catalog = FunctionRegistry()
60+
app.state.timvt_function_catalog = FunctionRegistry()
6161

6262
# Register Start/Stop application event handler to setup/stop the database connection
6363
# and populate `app.state.table_catalog`
@@ -72,7 +72,7 @@ async def shutdown_event():
7272
await close_db_connection(app)
7373

7474
# Register Function to the application internal registry
75-
app.state.function_catalog.register(
75+
app.state.timvt_function_catalog.register(
7676
Function.from_file(
7777
id="squares", # By default TiMVT will call a function call `squares`
7878
infile="my_sql_file.sql", # PATH TO SQL FILE
@@ -90,7 +90,7 @@ app.include_router(mvt_tiler.router)
9090

9191
!!! Important
9292

93-
A function `Registry` object (timvt.layer.FunctionRegistry) should be initialized and store within the application **state**. TiMVT assumes `app.state.function_catalog` is where the registry is.
93+
A function `Registry` object (timvt.layer.FunctionRegistry) should be initialized and stored within the application **state**. TiMVT assumes `app.state.timvt_function_catalog` is where the registry is.
9494

9595
## Function Options
9696

timvt/dependencies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def LayerParams(
4545
layer: str = Path(..., description="Layer Name"),
4646
) -> Layer:
4747
"""Return Layer Object."""
48-
# Check function_catalog
48+
# Check timvt_function_catalog
4949
function_catalog = getattr(request.app.state, "timvt_function_catalog", {})
5050
func = function_catalog.get(layer)
5151
if func:

0 commit comments

Comments
 (0)