Skip to content

Commit da58b27

Browse files
docs(readme): update example snippets (#79)
1 parent e73faf5 commit da58b27

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ pip install orb-billing
2121
The full API of this library can be found in [api.md](https://www.github.com/orbcorp/orb-python/blob/main/api.md).
2222

2323
```python
24+
import os
2425
from orb import Orb
2526

2627
client = Orb(
27-
# defaults to os.environ.get("ORB_API_KEY")
28-
api_key="My API Key",
28+
# This is the default and can be omitted
29+
api_key=os.environ.get("ORB_API_KEY"),
2930
)
3031

3132
customer = client.customers.create(
@@ -45,12 +46,13 @@ so that your API Key is not stored in source control.
4546
Simply import `AsyncOrb` instead of `Orb` and use `await` with each API call:
4647

4748
```python
49+
import os
4850
import asyncio
4951
from orb import AsyncOrb
5052

5153
client = AsyncOrb(
52-
# defaults to os.environ.get("ORB_API_KEY")
53-
api_key="My API Key",
54+
# This is the default and can be omitted
55+
api_key=os.environ.get("ORB_API_KEY"),
5456
)
5557

5658

0 commit comments

Comments
 (0)