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.8
to
1.0.9
+8
apteryx/utils/functions.py
def retry(f, n, *fargs, **fkwargs):
for t in range(n):
try:
res = f(*fargs, **fkwargs)
return res
except ValueError:
print(f'Failed {t} time(s); trying again {n-t} more time(s).')
continue
+11
-3

@@ -10,6 +10,14 @@ from typing import Union

credentials = service_account.Credentials.from_service_account_file(os.getenv('GCLOUD_CREDENTIALS', input('abs path to GCP credentials: ')))
client = storage.Client(project=os.getenv('GCLOUD_PROJECT', input('GCLOUD_PROJECT: ')), credentials=credentials)
creds_path = os.getenv('GCLOUD_CREDENTIALS')
if not creds_path:
creds_path = input('abs path to GCP credentials:')
gcloud_project = os.getenv('GCLOUD_PROJECT')
if not gcloud_project:
gcloud_project = input('GCLOUD_PROJECT: ')
credentials = service_account.Credentials.from_service_account_file(creds_path)
client = storage.Client(project=gcloud_project, credentials=credentials)
def set_gcp_creds(project_name: str, path_to_creds: Union[Path, str]) -> storage.Client:

@@ -50,3 +58,3 @@ credentials = service_account.Credentials.from_service_account_file(path_to_creds)

def rename_blob(blob: storage.blob.Blob, new_name, client=client):
def rename_blob(blob: storage.blob.Blob, new_name: str, client=client):
"""Renames a blob."""

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

Metadata-Version: 2.1
Name: apteryx
Version: 1.0.8
Version: 1.0.9
Summary: Utilities and useful things for Apteryx Labs

@@ -5,0 +5,0 @@ License: MIT

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

name = "apteryx"
version = "1.0.8"
version = "1.0.9"
description = "Utilities and useful things for Apteryx Labs"

@@ -10,0 +10,0 @@ authors = [ "apteryxlabs <matthew@apteryxlabs.com>",]

@@ -23,3 +23,3 @@ # -*- coding: utf-8 -*-

'name': 'apteryx',
'version': '1.0.8',
'version': '1.0.9',
'description': 'Utilities and useful things for Apteryx Labs',

@@ -26,0 +26,0 @@ 'long_description': None,