Skip to content
This repository was archived by the owner on May 20, 2025. It is now read-only.

Commit 81bf170

Browse files
committed
chore: updates documentation examples
Updates documentation to improve code examples: - Adds `fmt` import to Go example. - Updates Python import path for `Nitric` resource. - Corrects Python secret version printing example.
1 parent 36ef55e commit 81bf170

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

docs/index.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Nitric.run()
6161
// !collapse(1:5) collapsed
6262
import (
6363
"context"
64+
"fmt"
6465

6566
"github.com/nitrictech/go-sdk/nitric"
6667
"github.com/nitrictech/go-sdk/nitric/apis"

docs/schedules.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ schedule('send-reminder').cron('0 22 * * 1-5', async (ctx) => {
5050

5151
```python !!
5252
from nitric.resources import schedule
53-
from nitric.resources import Nitric
53+
from nitric.application import Nitric
5454

5555
# Run every 5 minutes
5656
processor = schedule("process-transactions")

docs/secrets.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ api_key = secret("api-key").allow("put")
132132
latest = await api_key.put("a new secret value")
133133

134134
# We can get the version ID of our newly stored value
135-
latest.version
135+
print(latest.version)
136136

137137
Nitric.run()
138138
```

0 commit comments

Comments
 (0)