Skip to content

docs: load the README API key from the environment - #1

Draft
illuminati1911 wants to merge 1 commit into
masterfrom
readme-environment-api-key
Draft

illuminati1911 wants to merge 1 commit into
masterfrom
readme-environment-api-key

Conversation

@illuminati1911

Copy link
Copy Markdown
Collaborator

Summary

  • Load the API key from GOOGLE_MAPS_API_KEY in the README's primary Python example instead of an inline placeholder.
  • Show how to configure the environment variable and remind readers to keep credentials out of source control.
  • Preserve the existing API-key security guidance and unrelated examples. No library runtime changes or new dependencies.

The existing example passes an inline placeholder directly to the client despite the surrounding guidance to keep keys secret: https://github.com/googlemaps/google-maps-services-python/blob/d3b71ab1333cff0f900d2db6b39c1356341a5ea2/README.md#L55-L78

Verification

  • Python 3.10: python -m pytest — 105 passed.
  • Executed the README's shell setup and Python initialization with a non-secret test key; confirmed the client receives it. Confirmed a missing variable raises KeyError. Outgoing network calls were blocked; no Maps API requests were made.
  • Visually inspected a local Markdown rendering of the README and the generated Sphinx documentation in Chromium.
  • nox --download-python never -s docs --force-python 3.10 — passed.
  • The prescribed Python 3.7 docs session could not run because Python 3.7 is unavailable on this machine. The Python 3.10 build is supplemental, not proof of Python 3.7 compatibility.
  • Nox rejected the previously proposed --no-notify option; pytest was run directly with the repository's test dependencies to avoid the follow-on Codecov upload.

@illuminati1911 illuminati1911 self-assigned this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant