Skip to content

Commit 1663c6b

Browse files
SK-2707: drop .env.example from samples, document placeholder workflow
Remove samples/.env.example and the dotenv/.env loading guidance from samples/README.md. The samples are run by replacing the inline <PLACEHOLDER> values directly. Update the OB-11 backlog entry to match. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 1aee4b1 commit 1663c6b

3 files changed

Lines changed: 8 additions & 56 deletions

File tree

docs/onboarding-backlog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Evidence tagging: claims verified against code carry a `file:line` reference. It
3939
| OB-8 | Document undocumented enums (TokenMode, etc.) | README-content | P1 | S | API-coverage |
4040
| OB-9 | Document Skyflow client-management methods | README-content | P1 | S | API-coverage |
4141
| OB-10 | Document `is_expired` & `generate_signed_data_tokens_from_creds` | README-content | P1 | S | API-coverage |
42-
| OB-11 | Add `samples/README.md` + `.env.example` | Samples | P1 | M | Onboarding |
42+
| OB-11 | Add `samples/README.md` | Samples | P1 | M | Onboarding |
4343
| OB-12 | Document client lifecycle / thread-safety / retries | README-content | P1 | M | Onboarding |
4444
| OB-13 | Document Detect helper classes (EntityInfo, TextIndex, Bleep, File) | README-content | P2 | M | API-coverage |
4545
| OB-14 | Add README badges (PyPI, Python versions, build, license) | Polish | P2 | S | Onboarding |
@@ -164,14 +164,14 @@ Evidence tagging: claims verified against code carry a `file:line` reference. It
164164

165165
**Acceptance criteria:** Both functions documented with a usage snippet.
166166

167-
### OB-11 · `samples/README.md` + `.env.example`
167+
### OB-11 · `samples/README.md`
168168
*Priority P1 · Effort M · Samples · Onboarding*
169169

170-
**Problem:** 22 sample files across `samples/{vault_api,detect_api,service_account}` have no README and no env template; each hardcodes `<PLACEHOLDERS>`. There's no `cp .env.example .env` flow to make them runnable.
170+
**Problem:** 22 sample files across `samples/{vault_api,detect_api,service_account}` have no README explaining prerequisites or how to run them; each hardcodes `<PLACEHOLDERS>`.
171171

172-
**Proposed fix:** Add `samples/README.md` (prerequisites, how to run, what each sample shows) and a `.env.example` with the variables the samples read. Optionally refactor samples to load from env.
172+
**Proposed fix:** Add `samples/README.md` (prerequisites, how to run, what each sample shows, per-sample index).
173173

174-
**Acceptance criteria:** A user can run any sample by copying `.env.example`, filling values, and following `samples/README.md`.
174+
**Acceptance criteria:** A user can run any sample by following `samples/README.md` and replacing the inline placeholders with their own values.
175175

176176
### OB-12 · Client lifecycle / thread-safety / retries
177177
*Priority P1 · Effort M · README-content · Onboarding*

samples/.env.example

Lines changed: 0 additions & 30 deletions
This file was deleted.

samples/README.md

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,13 @@ Runnable examples for the Skyflow Python SDK, grouped by area. Start with the [R
77
- Python 3.9 or above
88
- The SDK installed: `pip install skyflow`
99
- A Skyflow account, a vault, and a service account (see [Before you begin](../README.md#before-you-begin))
10-
- The values listed in [`.env.example`](.env.example): `vault_id`, `cluster_id`, `env`, and one credential (API key, bearer token, or service-account credentials)
10+
- Your `vault_id`, `cluster_id`, `env`, and one credential (API key, bearer token, or service-account credentials)
1111

1212
## Configure
1313

14-
Copy the env template and fill in your values:
14+
The samples ship with inline `<PLACEHOLDER>` strings (for example `<YOUR_VAULT_ID>`). Replace the placeholders in the sample you want to run with your own values before running it.
1515

16-
```bash
17-
cp .env.example .env
18-
```
19-
20-
The samples ship with inline `<PLACEHOLDER>` strings (for example `<YOUR_VAULT_ID>`). You can either:
21-
22-
1. **Replace the placeholders** directly in the sample file you want to run, or
23-
2. **Load from `.env`** by adding the following near the top of the sample (`python-dotenv` is already a SDK dependency):
24-
25-
```python
26-
import os
27-
from dotenv import load_dotenv
28-
29-
load_dotenv()
30-
vault_id = os.getenv('SKYFLOW_VAULT_ID')
31-
# ...use os.getenv(...) for the other values
32-
```
33-
34-
> Never commit a filled-in `.env` or any real credentials.
16+
> Never commit real credentials.
3517
3618
## Run a sample
3719

0 commit comments

Comments
 (0)