You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/source/core_engine/03-store.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,10 +9,12 @@ The `store` is a class attribute in the `DiffSync` class, but all the store oper
9
9
When you initialize the `Diffsync` Adapter class, there is an optional keyed-argument, `internal_storage_engine`, defaulting to the `LocalStore` class.
10
10
11
11
```python
12
-
>>>from diffsync import DiffSync
13
-
>>> adapter = DiffSync()
14
-
>>>type(adapter.store)
15
-
<class'diffsync.store.local.LocalStore'>
12
+
>>>from diffsync import Adapter
13
+
>>> adapter = Adapter()
14
+
>>>type(adapter.store)
15
+
<
16
+
17
+
class'diffsync.store.local.LocalStore'>
16
18
```
17
19
18
20
## Use the `RedisStore` Backend
@@ -22,12 +24,14 @@ To get it, you have to install diffsync package with the "redis" extra option: `
22
24
The `RedisStore` backend, as the name suggests, connects to an external Redis service, to store data loaded by the `DiffSync` tasks. The biggest change is that it requires to initialize the Redis store class, before using it in the `DiffSync` adapter class.
Copy file name to clipboardExpand all lines: docs/source/getting_started/01-getting-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,10 +44,10 @@ Currently the relationships between models are very loose by design. Instead of
44
44
A `DiffSync` "adapter" subclass must reference each model available at the top of the object by its modelname and must have a `top_level` attribute defined to indicate how the diff and the synchronization should be done. In the example below, `"site"` is the only top level object so the synchronization engine will only check all known `Site` instances and all children of each Site. In this case, as shown in the code above, `Device`s are children of `Site`s, so this is exactly the intended logic.
0 commit comments