Skip to content

Commit 72443c0

Browse files
authored
Fix import statement and update catalog creation
1 parent 53f23d3 commit 72443c0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ To use this library, you must implement two key classes:
2727
### Example
2828

2929
```python
30-
from pyopds2 import Catalog, DataProvider, DataProviderRecord, Metadata, Link, SearchResponse
30+
from pyopds2 import Catalog, DataProvider, DataProviderRecord, Metadata, Link
3131

3232
class MyRecord(DataProviderRecord):
3333
def metadata(self):
@@ -44,7 +44,7 @@ class MyProvider(DataProvider):
4444
# Return a list of MyRecord instances and total count
4545
return SearchResponse(records, len(records), query, limit, offset, sort)
4646

47-
catalog = Catalog.create(MyProvider, search=MyProvider.search("example"))
47+
catalog = Catalog.create(MyProvider.search("example"))
4848
print(catalog.model_dump_json(indent=2))
4949
```
5050

0 commit comments

Comments
 (0)