aboutsummaryrefslogtreecommitdiffstats
path: root/extra
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2019-09-05 18:54:39 -0700
committerBryan Newbold <bnewbold@robocracy.org>2019-09-05 18:54:39 -0700
commita65dfc914517376b5ededb82e594236c5d61c721 (patch)
tree381a5d346dfad7f020c344d2c4740eefb71be61d /extra
parent28d2d94a9100c1a809955cde93fdbb7a36263057 (diff)
downloadfatcat-a65dfc914517376b5ededb82e594236c5d61c721.tar.gz
fatcat-a65dfc914517376b5ededb82e594236c5d61c721.zip
update all other mentions of python client lib
Diffstat (limited to 'extra')
-rw-r--r--extra/demo_entities/delete_builtins.py4
-rw-r--r--extra/demo_entities/enrich_examples.py10
-rwxr-xr-xextra/fixups/fixup_longtail_issnl_unique.py4
3 files changed, 9 insertions, 9 deletions
diff --git a/extra/demo_entities/delete_builtins.py b/extra/demo_entities/delete_builtins.py
index 31af7a8f..928f06e0 100644
--- a/extra/demo_entities/delete_builtins.py
+++ b/extra/demo_entities/delete_builtins.py
@@ -2,7 +2,7 @@
# cp ../extra/demo_entities/delete_builtins.py .
# pipenv run python3 delete_builtins.py
-import fatcat_client
+import fatcat_openapi_client
from fatcat_tools import *
import os
@@ -10,7 +10,7 @@ token = os.environ['FATCAT_API_AUTH_TOKEN']
assert token
api = authenticated_api('http://localhost:9411/v0', token)
-eg = api.create_editgroup(fatcat_client.Editgroup(
+eg = api.create_editgroup(fatcat_openapi_client.Editgroup(
description="Clear out built-in database example entities"))
container_ids = (
diff --git a/extra/demo_entities/enrich_examples.py b/extra/demo_entities/enrich_examples.py
index a97263b9..10b9534f 100644
--- a/extra/demo_entities/enrich_examples.py
+++ b/extra/demo_entities/enrich_examples.py
@@ -7,18 +7,18 @@ Ugh, it needs to be copied to ../../python (with ./files/) to actually run. Derp
import os
import datetime
-import fatcat_client
-from fatcat_client.rest import ApiException
-from fatcat_client import *
+import fatcat_openapi_client
+from fatcat_openapi_client.rest import ApiException
+from fatcat_openapi_client import *
from fatcat_tools import *
import datetime
# setup env
#admin_id = "aaaaaaaaaaaabkvkaaaaaaaaae"
-#local_conf = fatcat_client.Configuration()
+#local_conf = fatcat_openapi_client.Configuration()
#local_conf.host = 'http://localhost:9411/v0'
-#local_api = fatcat_client.DefaultApi(fatcat_client.ApiClient(local_conf))
+#local_api = fatcat_openapi_client.DefaultApi(fatcat_openapi_client.ApiClient(local_conf))
#api = local_api
api = authenticated_api(
'http://localhost:9411/v0',
diff --git a/extra/fixups/fixup_longtail_issnl_unique.py b/extra/fixups/fixup_longtail_issnl_unique.py
index 385b0e29..ea615a13 100755
--- a/extra/fixups/fixup_longtail_issnl_unique.py
+++ b/extra/fixups/fixup_longtail_issnl_unique.py
@@ -54,7 +54,7 @@ import json
import sqlite3
import itertools
-import fatcat_client
+import fatcat_openapi_client
from fatcat_tools import authenticated_api
from fatcat_tools.importers.common import EntityImporter, clean, LinePusher
from fatcat_tools.importers.arabesque import b32_hex
@@ -149,7 +149,7 @@ class LongtailIssnlSingleDomainFixup(EntityImporter):
#print(sha1)
try:
file_entity = self.api.lookup_file(sha1=sha1, expand="releases")
- except fatcat_client.rest.ApiException as err:
+ except fatcat_openapi_client.rest.ApiException as err:
if err.status == 404:
self.counts['skip-file-not-found'] += 1
return None