Azure / Azure/azure-sdk-for-python
[Cosmos] Add Constants for common request options
- Dominant language
- Python
- Stars
- 5.6k
- Forks
- 3.4k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 193
Description
Using _constants.py and the constant of Kwargs.RETRY_WRITE as an example, Create constants for the common requests options used for sync and async requests and for _base.py.
1. Start with the ones in _base._COMMON_OPTIONS.
2. Add constants as needed to replace hard coded strings related to request options and centralized those constants in _constants.py. Use naming conventions that make sense and follow precedence and provide appropriate type hints.
3. Make sure to avoid hard coded strings not related to options, request options, and headers.
4. Add comments in _constants.py describing best practices of using constants instead of hard coded strings.
Contributor guide
Assessment
This issue has not been assessed yet.