|
@property |
|
def warehouse_package_name(self) -> str: |
|
"""Return the appropriate Python package name for Warehouse.""" |
|
|
|
# Piece the name and namespace together to come up with the |
|
# proper package name. |
|
answer = list(self.namespace) + self.name.split(' ') |
|
return '-'.join(answer).lower() |
Occasionally we want to deviate from the generated provided
api.naming.warehouse_package_name.
- The published package includes two GAPICs (firestore admin and firestore) and we want the library to be consistently named
google-cloud-firestore.
- The API has a long name and we want to rename the package to make it easier to spell.
google-cloud-assuredworkloads -> google-cloud-assured-workloads.
The name is used to identify the library in request headers so it is somewhat important.
|
DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( |
|
gapic_version=pkg_resources.get_distribution( |
|
'{{ api.naming.warehouse_package_name }}', |
|
).version, |
|
) |
CC @crwilcox
gapic-generator-python/gapic/schema/naming.py
Lines 186 to 193 in f86a47b
Occasionally we want to deviate from the generated provided
api.naming.warehouse_package_name.google-cloud-firestore.google-cloud-assuredworkloads->google-cloud-assured-workloads.The name is used to identify the library in request headers so it is somewhat important.
gapic-generator-python/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2
Lines 29 to 33 in af17501
CC @crwilcox