1
0

Secrets
Some checks failed
Run Python tests (through Pytest) / Test (push) Failing after 33s
Verify Python project can be installed, loaded and have version checked / Test (push) Has been cancelled

This commit is contained in:
Jon Michael Aanes 2024-11-26 23:34:53 +01:00
parent 5221164ddf
commit 9d84733b94
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA
3 changed files with 49 additions and 30 deletions

View File

@ -42,8 +42,8 @@ class KrakenAccountBalances(FinanceDepoScraper):
def get_depo_fetcher(self): def get_depo_fetcher(self):
return fin_depo.defi_kraken.KrakenDepoFetcher( return fin_depo.defi_kraken.KrakenDepoFetcher(
kraken_key=secrets.KRAKEN_KEY, kraken_key=secrets.kraken_key(),
kraken_secret=secrets.KRAKEN_SECRET, kraken_secret=secrets.kraken_secret(),
) )
@ -53,9 +53,9 @@ class KucoinAccountBalances(FinanceDepoScraper):
def get_depo_fetcher(self): def get_depo_fetcher(self):
return fin_depo.defi_kucoin.KucoinDepoFetcher( return fin_depo.defi_kucoin.KucoinDepoFetcher(
kucoin_key=secrets.KUCOIN_KEY, kucoin_key=secrets.kucoin_key(),
kucoin_secret=secrets.KUCOIN_SECRET, kucoin_secret=secrets.kucoin_secret(),
kucoin_pass=secrets.KUCOIN_PASS, kucoin_pass=secrets.kucoin_pass(),
) )
@ -66,5 +66,5 @@ class MpcBalance(FinanceDepoScraper):
def get_depo_fetcher(self): def get_depo_fetcher(self):
return fin_depo.defi_partisia_blockchain.PartisiaBlockchainAccountDepoFetcher( return fin_depo.defi_partisia_blockchain.PartisiaBlockchainAccountDepoFetcher(
self.session, self.session,
blockchain_address=secrets.PBC_ACCOUNT_ADDRESS, blockchain_address=secrets.pbc_account_address(),
) )

View File

@ -28,7 +28,7 @@ class SteamAchievement(Scraper):
deduplicate_mode = DeduplicateMode.BY_ALL_COLUMNS deduplicate_mode = DeduplicateMode.BY_ALL_COLUMNS
def scrape(self) -> Iterator[dict[str, Any]]: def scrape(self) -> Iterator[dict[str, Any]]:
username: str = secrets.STEAM_USERNAME username: str = secrets.steam_username()
appids = list(self._determine_appids_from_recent_activity(username)) appids = list(self._determine_appids_from_recent_activity(username))
logger.info('Found %d Steam Apps', len(appids)) logger.info('Found %d Steam Apps', len(appids))
for appid in appids: for appid in appids:

View File

@ -1,47 +1,66 @@
from secret_loader import SecretLoader from secret_loader import SecretLoader
load_secret = SecretLoader(env_key_prefix='CF_PD').load secrets = SecretLoader(env_key_prefix='CF_PD')
# Crunchyroll # Crunchyroll
CRUNCHYROLL_DEVICE_ID = load_secret('CRUNCHYROLL_DEVICE_ID') CRUNCHYROLL_DEVICE_ID = secrets.load('CRUNCHYROLL_DEVICE_ID')
CRUNCHYROLL_AUTH = load_secret('CRUNCHYROLL_AUTH') CRUNCHYROLL_AUTH = secrets.load('CRUNCHYROLL_AUTH')
# FFXIV # FFXIV
FFXIV_CHARACTER_ID = load_secret('FFXIV_CHARACTER_ID') FFXIV_CHARACTER_ID = secrets.load('FFXIV_CHARACTER_ID')
# Playstation # Playstation
PLAYSTATION_PSN_ID = load_secret('PLAYSTATION_PSN_ID') PLAYSTATION_PSN_ID = secrets.load('PLAYSTATION_PSN_ID')
# Partisia Blockchain # Partisia Blockchain
PBC_ACCOUNT_ADDRESS = load_secret('PBC_ACCOUNT_ADDRESS') def pbc_account_address():
return secrets.load_or_fail('PBC_ACCOUNT_ADDRESS')
# Steam # Steam
STEAM_USERNAME = load_secret('STEAM_USERNAME') def steam_username():
return secrets.load_or_fail('STEAM_USERNAME')
# Kucoin # Kucoin
KUCOIN_KEY = load_secret('KUCOIN_KEY') def kucoin_key():
KUCOIN_SECRET = load_secret('KUCOIN_SECRET') return secrets.load_or_fail('KUCOIN_KEY')
KUCOIN_PASS = load_secret('KUCOIN_PASS')
def kucoin_secret():
return secrets.load_or_fail('KUCOIN_SECRET')
def kucoin_pass():
return secrets.load_or_fail('KUCOIN_PASS')
# Kraken # Kraken
KRAKEN_KEY = load_secret('KRAKEN_KEY') def kraken_key():
KRAKEN_SECRET = load_secret('KRAKEN_SECRET') return secrets.load_or_fail('KRAKEN_KEY')
def kraken_secret():
return secrets.load_or_fail('KRAKEN_SECRET')
# Home Assistant # Home Assistant
HOME_ASSISTANT_ROOT = load_secret('HOME_ASSISTANT_ROOT') HOME_ASSISTANT_ROOT = secrets.load('HOME_ASSISTANT_ROOT')
HOME_ASSISTANT_LLAK = load_secret('HOME_ASSISTANT_LLAK') HOME_ASSISTANT_LLAK = secrets.load('HOME_ASSISTANT_LLAK')
# Email configuration # Email configuration
MAILGUN_API_KEY = load_secret('MAILGUN_API_KEY') MAILGUN_API_KEY = secrets.load('MAILGUN_API_KEY')
MAILGUN_DOMAIN = load_secret('MAILGUN_DOMAIN') MAILGUN_DOMAIN = secrets.load('MAILGUN_DOMAIN')
MAILGUN_RECIPIENT = load_secret('MAILGUN_RECIPIENT') MAILGUN_RECIPIENT = secrets.load('MAILGUN_RECIPIENT')
# Jellyfin # Jellyfin
JELLYFIN_URL = load_secret('JELLYFIN_URL') JELLYFIN_URL = secrets.load('JELLYFIN_URL')
JELLYFIN_USERNAME = load_secret('JELLYFIN_USERNAME') JELLYFIN_USERNAME = secrets.load('JELLYFIN_USERNAME')
JELLYFIN_PASSWORD = load_secret('JELLYFIN_PASSWORD') JELLYFIN_PASSWORD = secrets.load('JELLYFIN_PASSWORD')
# Withings # Withings
WITHINGS_CLIENTID = load_secret('WITHINGS_CLIENTID') WITHINGS_CLIENTID = secrets.load('WITHINGS_CLIENTID')
WITHINGS_SECRET = load_secret('WITHINGS_SECRET') WITHINGS_SECRET = secrets.load('WITHINGS_SECRET')
WITHINGS_CALLBACK_URI = load_secret('WITHINGS_CALLBACK_URI') WITHINGS_CALLBACK_URI = secrets.load('WITHINGS_CALLBACK_URI')