Skip to content

Commit

Permalink
types docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tripott committed Jun 8, 2022
1 parent 7efe361 commit 6a57447
Show file tree
Hide file tree
Showing 2 changed files with 273 additions and 6 deletions.
8 changes: 4 additions & 4 deletions examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@
Hyper,
HyperGetResult,
HyperSearchLoadResult,
IdResult,
ListOptions,
OkDocsResult,
QueryOptions,
SearchQueryOptions,
)

config = dotenv_values("./.env")
Expand All @@ -32,7 +35,7 @@ def data_add():
"year": "1985",
}

result = hyper.data.add(movie)
result: IdResult = hyper.data.add(movie)
print("hyper.data.add result --> ", result)
# hyper.data.add result --> {'id': 'movie-4000', 'ok': True, 'status': 201}

Expand Down Expand Up @@ -102,9 +105,7 @@ def query():

options: QueryOptions = {
"fields": ["_id", "name", "published"],
"sort": None,
"limit": 3,
"useIndex": None,
}

result = hyper.data.query(selector, options)
Expand All @@ -125,7 +126,6 @@ def query_index():
"fields": ["author", "published"],
"sort": [{"author": "DESC"}, {"published": "DESC"}],
"useIndex": "idx_author_published",
"limit": None,
}

result = hyper.data.query(selector, options)
Expand Down
Loading

0 comments on commit 6a57447

Please sign in to comment.