art049 / art049/odmantic

Motor `get_database` method kwargs support

Open
#70 2 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
1.2k
Forks
97
PR merge metrics
No merged PRs in 30d

Description

Motor supports additional options for databases
```python
def get_database(self, name=None, codec_options=None, read_preference=None,
write_concern=None, read_concern=None):
...
```

I always use feature with setting `read_preference=ReadPreference.SECONDARY_PREFERRED`.
It's really helps with highload apps.

Why don't you pass this options to `AIOEngine` init?

Contributor guide

Open the contributing guide

Research direction

Start at the AIOEngine initialization and the code that obtains a database through Motor's get_database method. Trace how initialization options are currently handled, then verify that the requested database options can be passed through and covered by the existing test suite; done means read preference and the other listed kwargs reach get_database.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, python
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.