Skip to content

Instantly share code, notes, and snippets.

@guinslym
Created February 7, 2025 15:27
Show Gist options
  • Save guinslym/3b7283b5619136af98cc9f5906fcd366 to your computer and use it in GitHub Desktop.
Save guinslym/3b7283b5619136af98cc9f5906fcd366 to your computer and use it in GitHub Desktop.
from pathlib import Path
from dotenv import dotenv_values
# Read the .secrets file
config = dotenv_values(".secrets")
print(config)
from lh3.api import Client
client = Client()
try:
daily_chats = client.chats().list_day(2024, 3, 1)
print("Connection successful")
except Exception as e:
print(f"Connection failed: {str(e)}")
In [6]: from lh3.api import Client
...:
...: # Create client and test connection
...: client = Client()
...: try:
...: daily_chats = client.chats().list_day(2024, 3, 1)
...: print("Connection successful")
...: except Exception as e:
...: print(f"Connection failed: {str(e)}")
...:
Connection failed: invalid username/password combination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment