GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow package name to be customized via a generator option · Issue #605 · googleapis/gapic-generator-python

This repository was archived by the owner on Aug 25, 2026. It is now read-only.
This repository was archived by the owner on Aug 25, 2026. It is now read-only.

Allow package name to be customized via a generator option #605

Copy link
Copy link
Closed
#1133
#717
Closed
Allow package name to be customized via a generator option#605
#1133
#717
Copy link
Assignees
yoshi-automation
Labels
type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Description

@busunkim96
busunkim96
opened on Sep 18, 2020
Issue body actions

gapic-generator-python/gapic/schema/naming.py

Lines 186 to 193 in f86a47b

@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.

gapic-generator-python/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/base.py.j2

Lines 29 to 33 in af17501

DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo(
gapic_version=pkg_resources.get_distribution(
'{{ api.naming.warehouse_package_name }}',
).version,
)

CC @crwilcox

Activity

  1. busunkim96
    added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    on Sep 18, 2020
  2. gcf-merge-on-green
    closed this as completedin #717on Dec 22, 2020
  3. gcf-merge-on-green
    added 2 commits that reference this issue on Dec 22, 2020

    feat: allow warehouse name to be customized (#717)

    This issue will close once commit 7c185e8 is merged into the 'main' branch.
    7c185e8

    chore: release 0.39.0 (#719)

    This issue will close once commit f646767 is merged into the 'main' branch.
    f646767
  4. JustinBeckwith
    assigned
    yoshi-automation
    on Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @yoshi-automation
    yoshi-automation

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.