Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

apteryx

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

apteryx - npm Package Compare versions

Comparing version
1.0.10
to
1.0.11
+11
-11
apteryx/google/storage.py

@@ -11,9 +11,9 @@ import pathlib

creds_path = os.getenv('GCLOUD_CREDENTIALS')
creds_path = os.getenv("GCLOUD_CREDENTIALS")
if not creds_path:
creds_path = input('abs path to GCP credentials:')
creds_path = input("abs path to GCP credentials:")
gcloud_project = os.getenv('GCLOUD_PROJECT')
gcloud_project = os.getenv("GCLOUD_PROJECT")
if not gcloud_project:
gcloud_project = input('GCLOUD_PROJECT: ')
gcloud_project = input("GCLOUD_PROJECT: ")

@@ -32,5 +32,3 @@ credentials = service_account.Credentials.from_service_account_file(creds_path)

# Note: Client.list_blobs requires at least package version 1.17.0.
blobs = client.list_blobs(
bucket_name, prefix=prefix, delimiter=delimiter
)
blobs = client.list_blobs(bucket_name, prefix=prefix, delimiter=delimiter)

@@ -41,3 +39,3 @@ return list(blobs)

def download_blob(blob, dst, client=client):
with open(dst, 'wb') as file_obj:
with open(dst, "wb") as file_obj:
client.download_blob_to_file(blob, file_obj)

@@ -55,4 +53,4 @@

dst = os.path.join(dst_path, fname)
print(f'Downloading: {fname}')
print(f'To: {dst}')
print(f"Downloading: {fname}")
print(f"To: {dst}")
download_blob(blob, dst, client=client)

@@ -62,3 +60,5 @@ print("DONE")

def rename_blob(blob: storage.blob.Blob, new_name: Union[str, pathlib.Path], client=client):
def rename_blob(
blob: storage.blob.Blob, new_name: Union[str, pathlib.Path], client=client
):
"""Renames a blob."""

@@ -65,0 +65,0 @@ # bucket_name = "your-bucket-name"

from typing import Union
Json = Union[list, dict, str, int, bool, bytes]
Json = Union[list, dict, str, int, bool, bytes]
import numpy as np
def retry(n):

@@ -28,2 +29,2 @@ def decorator_wrapper(function):

return decorator_wrapper
return decorator_wrapper

@@ -7,3 +7,3 @@ def retry(f, n, *fargs, **fkwargs):

except ValueError:
print(f'Failed {t} time(s); trying again {n-t} more time(s).')
continue
print(f"Failed {t} time(s); trying again {n-t} more time(s).")
continue

@@ -6,5 +6,5 @@ import requests

def get_public_ip():
resp = requests.get('https://www.whatismyip.org/my-ip-address')
resp = requests.get("https://www.whatismyip.org/my-ip-address")
df = pd.read_html(resp.text)[0]
df.columns = ['labels', 'vals']
return df[df.labels == 'Your IP'].vals[0]
df.columns = ["labels", "vals"]
return df[df.labels == "Your IP"].vals[0]
Metadata-Version: 2.1
Name: apteryx
Version: 1.0.10
Version: 1.0.11
Summary: Utilities and useful things for Apteryx Labs

@@ -13,2 +13,3 @@ License: MIT

Classifier: Programming Language :: Python :: 3.9
Requires-Dist: black (>=21.7b0,<22.0)
Requires-Dist: google-api-python-client (>=2.9.0,<3.0.0)

@@ -15,0 +16,0 @@ Requires-Dist: google-auth-httplib2 (>=0.1.0,<0.2.0)

@@ -7,3 +7,3 @@ [build-system]

name = "apteryx"
version = "1.0.10"
version = "1.0.11"
description = "Utilities and useful things for Apteryx Labs"

@@ -24,2 +24,3 @@ authors = [ "apteryxlabs <matthew@apteryxlabs.com>",]

toml = "^0.10.2"
black = "^21.7b0"

@@ -26,0 +27,0 @@ [tool.poetry.dev-dependencies]

@@ -11,3 +11,4 @@ # -*- coding: utf-8 -*-

install_requires = \
['google-api-python-client>=2.9.0,<3.0.0',
['black>=21.7b0,<22.0',
'google-api-python-client>=2.9.0,<3.0.0',
'google-auth-httplib2>=0.1.0,<0.2.0',

@@ -24,3 +25,3 @@ 'google-auth-oauthlib>=0.4.4,<0.5.0',

'name': 'apteryx',
'version': '1.0.10',
'version': '1.0.11',
'description': 'Utilities and useful things for Apteryx Labs',

@@ -27,0 +28,0 @@ 'long_description': None,