Something went wrong. Try again.
CLI tools and operational extensions for the void architecture on ATProtocol.
Something went wrong. Try again.
12345678910111213141516171819202122232425262728import osimport syssys.path.insert(0, '/home/cameron/void/src')
from dotenv import load_dotenvfrom atproto import Client
load_dotenv('/home/cameron/void/.env', override=True)
pds_uri = os.getenv('PDS_URI', 'https://bsky.social')client = Client(base_url=pds_uri)client.login(os.getenv('BSKY_USERNAME'), os.getenv('BSKY_PASSWORD'))
# Block projectmartha.bsky.social# Need to resolve the handle to DID firstresponse = client.app.bsky.actor.get_profile({'actor': 'projectmartha.bsky.social'})target_did = response.did
# Create block recordblock_record = { 'subject': target_did, 'createdAt': client.get_current_time_iso()}
result = client.app.bsky.graph.block.create(client.me.did, block_record)print(f"Blocked projectmartha.bsky.social (DID: {target_did})")print(f"Block record URI: {result.uri}")