Skip to content

Commit

Permalink
Merge pull request #37 from 1Password/marton/fix-load-dict-docs
Browse files Browse the repository at this point in the history
Fix readme `load` and `load_dict` example
  • Loading branch information
Marton6 committed Feb 16, 2022
2 parents 678d607 + 43ca4f8 commit c809bfa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ Users can create `classes` or `dicts` that describe fields they wish to get the
- **load**: Takes an object with class attributes annotated with tags describing where to find desired fields in 1Password. Manipulates given object and fills attributes in with 1Password item field values.

```python
# example dict configuration for onepasswordconnectsdk.load_dict(CONFIG)
# example dict configuration for onepasswordconnectsdk.load_dict(client, CONFIG)
CONFIG = {
"server": {
"opitem": "My database item",
Expand All @@ -179,11 +179,11 @@ CONFIG = {
},
}

values_dict = onepasswordconnectsdk.load_dict(CONFIG)
values_dict = onepasswordconnectsdk.load_dict(client, CONFIG)
```

```python
# example class configuration for onepasswordconnectsdk.load(CONFIG)
# example class configuration for onepasswordconnectsdk.load(client, CONFIG)
class Config:
server: 'opitem:"My database item" opvault:some_vault_id opfield:specific_section.hostname' = None
database: 'opitem:"My database item" opfield:.database' = None
Expand All @@ -192,7 +192,7 @@ class Config:

CONFIG = Config()

values_object = onepasswordconnectsdk.load(CONFIG)
values_object = onepasswordconnectsdk.load(client, CONFIG)
```

## Development
Expand Down

0 comments on commit c809bfa

Please sign in to comment.