Skip to content

Commit 9c0989b

Browse files
authored
feat: add async client, add common resource helpers, add from_service_account_info factory (#30)
1 parent 38caca2 commit 9c0989b

File tree

30 files changed

+3761
-548
lines changed

30 files changed

+3761
-548
lines changed

packages/google-cloud-recaptcha-enterprise/.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you are still having issues, please be sure to include as much information as
2020
- OS type and version:
2121
- Python version: `python --version`
2222
- pip version: `pip --version`
23-
- `google-cloud-recpatcha-enterprise` version: `pip show google-cloud-recpatcha-enterprise`
23+
- `google-cloud-recpatchaenterprise` version: `pip show google-cloud-recpatchaenterprise`
2424

2525
#### Steps to reproduce
2626

packages/google-cloud-recaptcha-enterprise/.kokoro/build.sh

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
set -eo pipefail
1717

18-
cd github/python-recaptcha-enterprise
18+
if [[ -z "${PROJECT_ROOT:-}" ]]; then
19+
PROJECT_ROOT="github/python-recaptcha-enterprise"
20+
fi
21+
22+
cd "${PROJECT_ROOT}"
1923

2024
# Disable buffering, so that the logs stream through.
2125
export PYTHONUNBUFFERED=1
@@ -30,16 +34,16 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
3034
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
3135

3236
# Remove old nox
33-
python3.6 -m pip uninstall --yes --quiet nox-automation
37+
python3 -m pip uninstall --yes --quiet nox-automation
3438

3539
# Install nox
36-
python3.6 -m pip install --upgrade --quiet nox
37-
python3.6 -m nox --version
40+
python3 -m pip install --upgrade --quiet nox
41+
python3 -m nox --version
3842

3943
# If NOX_SESSION is set, it only runs the specified session,
4044
# otherwise run all the sessions.
4145
if [[ -n "${NOX_SESSION:-}" ]]; then
42-
python3.6 -m nox -s "${NOX_SESSION:-}"
46+
python3 -m nox -s ${NOX_SESSION:-}
4347
else
44-
python3.6 -m nox
48+
python3 -m nox
4549
fi

packages/google-cloud-recaptcha-enterprise/.kokoro/docs/docs-presubmit.cfg

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,14 @@ env_vars: {
1515
key: "TRAMPOLINE_IMAGE_UPLOAD"
1616
value: "false"
1717
}
18+
19+
env_vars: {
20+
key: "TRAMPOLINE_BUILD_FILE"
21+
value: "github/python-recaptcha-enterprise/.kokoro/build.sh"
22+
}
23+
24+
# Only run this nox session.
25+
env_vars: {
26+
key: "NOX_SESSION"
27+
value: "docs docfx"
28+
}

packages/google-cloud-recaptcha-enterprise/.trampolinerc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@
1818
required_envvars+=(
1919
"STAGING_BUCKET"
2020
"V2_STAGING_BUCKET"
21+
"NOX_SESSION"
2122
)
2223

2324
# Add env vars which are passed down into the container here.
2425
pass_down_envvars+=(
2526
"STAGING_BUCKET"
2627
"V2_STAGING_BUCKET"
28+
"NOX_SESSION"
2729
)
2830

2931
# Prevent unintentional override on the default image.

packages/google-cloud-recaptcha-enterprise/CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ instead of
193193
``https://github.com/googleapis/python-recaptcha-enterprise/blob/master/CONTRIBUTING.rst``)
194194
may cause problems creating links or rendering the description.
195195

196-
.. _description on PyPI: https://pypi.org/project/google-cloud-recpatcha-enterprise
196+
.. _description on PyPI: https://pypi.org/project/google-cloud-recpatchaenterprise
197197

198198

199199
*************************

packages/google-cloud-recaptcha-enterprise/LICENSE

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
Apache License
1+
2+
Apache License
23
Version 2.0, January 2004
3-
https://www.apache.org/licenses/
4+
http://www.apache.org/licenses/
45

56
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
67

@@ -192,7 +193,7 @@
192193
you may not use this file except in compliance with the License.
193194
You may obtain a copy of the License at
194195

195-
https://www.apache.org/licenses/LICENSE-2.0
196+
http://www.apache.org/licenses/LICENSE-2.0
196197

197198
Unless required by applicable law or agreed to in writing, software
198199
distributed under the License is distributed on an "AS IS" BASIS,
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
div#python2-eol {
22
border-color: red;
33
border-width: medium;
4-
}
4+
}
5+
6+
/* Ensure minimum width for 'Parameters' / 'Returns' column */
7+
dl.field-list > dt {
8+
min-width: 100px
9+
}

packages/google-cloud-recaptcha-enterprise/docs/conf.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22
#
3-
# google-cloud-recpatcha-enterprise documentation build configuration file
3+
# google-cloud-recpatchaenterprise documentation build configuration file
44
#
55
# This file is execfile()d with the current directory set to its
66
# containing dir.
@@ -67,7 +67,7 @@
6767
master_doc = "index"
6868

6969
# General information about the project.
70-
project = u"google-cloud-recpatcha-enterprise"
70+
project = u"google-cloud-recpatchaenterprise"
7171
copyright = u"2019, Google"
7272
author = u"Google APIs"
7373

@@ -140,7 +140,7 @@
140140
# further. For a list of options available for each theme, see the
141141
# documentation.
142142
html_theme_options = {
143-
"description": "Google Cloud Client Libraries for google-cloud-recpatcha-enterprise",
143+
"description": "Google Cloud Client Libraries for google-cloud-recpatchaenterprise",
144144
"github_user": "googleapis",
145145
"github_repo": "python-recaptcha-enterprise",
146146
"github_banner": True,
@@ -234,7 +234,7 @@
234234
# html_search_scorer = 'scorer.js'
235235

236236
# Output file base name for HTML help builder.
237-
htmlhelp_basename = "google-cloud-recpatcha-enterprise-doc"
237+
htmlhelp_basename = "google-cloud-recpatchaenterprise-doc"
238238

239239
# -- Options for warnings ------------------------------------------------------
240240

@@ -267,8 +267,8 @@
267267
latex_documents = [
268268
(
269269
master_doc,
270-
"google-cloud-recpatcha-enterprise.tex",
271-
u"google-cloud-recpatcha-enterprise Documentation",
270+
"google-cloud-recpatchaenterprise.tex",
271+
u"google-cloud-recpatchaenterprise Documentation",
272272
author,
273273
"manual",
274274
)
@@ -302,8 +302,8 @@
302302
man_pages = [
303303
(
304304
master_doc,
305-
"google-cloud-recpatcha-enterprise",
306-
u"google-cloud-recpatcha-enterprise Documentation",
305+
"google-cloud-recpatchaenterprise",
306+
u"google-cloud-recpatchaenterprise Documentation",
307307
[author],
308308
1,
309309
)
@@ -321,11 +321,11 @@
321321
texinfo_documents = [
322322
(
323323
master_doc,
324-
"google-cloud-recpatcha-enterprise",
325-
u"google-cloud-recpatcha-enterprise Documentation",
324+
"google-cloud-recpatchaenterprise",
325+
u"google-cloud-recpatchaenterprise Documentation",
326326
author,
327-
"google-cloud-recpatcha-enterprise",
328-
"google-cloud-recpatcha-enterprise Library",
327+
"google-cloud-recpatchaenterprise",
328+
"google-cloud-recpatchaenterprise Library",
329329
"APIs",
330330
)
331331
]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
RecaptchaEnterpriseService
2+
--------------------------------------------
3+
4+
.. automodule:: google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service
5+
:members:
6+
:inherited-members:
7+
8+
9+
.. automodule:: google.cloud.recaptchaenterprise_v1.services.recaptcha_enterprise_service.pagers
10+
:members:
11+
:inherited-members:
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Client for Google Cloud Recaptchaenterprise API
2-
===============================================
1+
Services for Google Cloud Recaptchaenterprise v1 API
2+
====================================================
3+
.. toctree::
4+
:maxdepth: 2
35

4-
.. automodule:: google.cloud.recaptchaenterprise_v1
5-
:members:
6-
:inherited-members:
6+
recaptcha_enterprise_service

0 commit comments

Comments
 (0)