Skip to content

Commit d2cb261

Browse files
committed
fix: remove unused json import
1 parent f35321f commit d2cb261

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

docs/quickstart.md

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -320,9 +320,7 @@ Let's include Lambda Powertools as a dependency in `requirement.txt`, and use Ev
320320

321321
=== "app.py"
322322

323-
```python hl_lines="3 5 8 13 19"
324-
import json
325-
323+
```python hl_lines="1 3 6 11 17"
326324
from aws_lambda_powertools.event_handler.api_gateway import ApiGatewayResolver
327325

328326
app = ApiGatewayResolver()
@@ -375,13 +373,11 @@ The first option could be to use the standard Python Logger, and use a specializ
375373

376374
=== "app.py"
377375

378-
```python hl_lines="2 5 9-14 21 27 32"
379-
import json
376+
```python hl_lines="4 5 7-12 19 25 30"
380377
import logging
381378
import os
382379

383380
from pythonjsonlogger import jsonlogger
384-
385381
from aws_lambda_powertools.event_handler.api_gateway import ApiGatewayResolver
386382

387383
logger = logging.getLogger("APP")
@@ -454,9 +450,7 @@ We could start by creating a dictionary with Lambda context information or somet
454450

455451
As we already have Lambda Powertools as a dependency, we can simply import [Logger](./core/logger.md){target="_blank"}.
456452

457-
```python title="Refactoring with Lambda Powertools Logger" hl_lines="3 5 7 14 20 24"
458-
import json
459-
453+
```python title="Refactoring with Lambda Powertools Logger" hl_lines="1 3 5 12 18 22"
460454
from aws_lambda_powertools import Logger
461455
from aws_lambda_powertools.event_handler.api_gateway import ApiGatewayResolver
462456
from aws_lambda_powertools.logging import correlation_paths
@@ -535,9 +529,7 @@ It's a [two-step process](https://docs.aws.amazon.com/lambda/latest/dg/services-
535529

536530
=== "app.py"
537531

538-
```python hl_lines="3 12 16 23 30"
539-
import json
540-
532+
```python hl_lines="1 10 14 21 28"
541533
from aws_xray_sdk.core import patch_all, xray_recorder
542534

543535
from aws_lambda_powertools import Logger
@@ -648,9 +640,7 @@ Within AWS X-Ray, we can answer these questions by using two features: tracing *
648640

649641
Let's put them into action.
650642

651-
```python title="Enriching traces with annotations and metadata" hl_lines="12 19-20 28-29 37 39-44 47"
652-
import json
653-
643+
```python title="Enriching traces with annotations and metadata" hl_lines="10 17-19 26-27 35 37-42 45"
654644
from aws_xray_sdk.core import patch_all, xray_recorder
655645

656646
from aws_lambda_powertools import Logger
@@ -729,9 +719,7 @@ We can simplify our previous patterns by using [Lambda Powertools Tracer](core/t
729719
!!! note
730720
You can now safely remove `aws-xray-sdk` from `requirements.txt`; keep `aws-lambda-powertools` only.
731721

732-
```python title="Refactoring with Lambda Powertools Tracer" hl_lines="3 8 13 15 21 23 29"
733-
import json
734-
722+
```python title="Refactoring with Lambda Powertools Tracer" hl_lines="1 6 11 13 19 21 27"
735723
from aws_lambda_powertools import Logger, Tracer
736724
from aws_lambda_powertools.event_handler.api_gateway import ApiGatewayResolver
737725
from aws_lambda_powertools.logging import correlation_paths

0 commit comments

Comments
 (0)