Skip to content

Commit

Permalink
Fix imports in README example
Browse files Browse the repository at this point in the history
  • Loading branch information
ludwiktrammer committed Apr 8, 2024
1 parent 8288802 commit 279050a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ In db-ally, developers define their use cases by implementing [**views**](https:
This is a basic implementation of a db-ally view for an example HR application, which retrieves candidates from an SQL database:

```python
from dbally import decorators, SqlAlchemyBaseView
import dbally
from dbally import decorators, SqlAlchemyBaseView, create_collection
from sqlalchemy import create_engine

class CandidateView(SqlAlchemyBaseView):
"""
Expand All @@ -52,7 +52,7 @@ class CandidateView(SqlAlchemyBaseView):
return Candidate.country == country

engine = create_engine('sqlite:///candidates.db')
my_collection = dbally.create_collection("collection_name")
my_collection = create_collection("collection_name")
my_collection.add(CandidateView, lambda: CandidateView(engine))

my_collection.ask("Find candidates from United States")
Expand Down

0 comments on commit 279050a

Please sign in to comment.