python

Standardize EOS Python imports, environment variables, async patterns, and Neon PostgreSQL access.

1|Updated Mar 11, 2026
One-click install
npx skills add https://github.com/antonyfmunoz/OS --skill python-antonyfmunoz
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: python
Source: https://github.com/antonyfmunoz/OS/tree/main/skills/tools/python
Command: npx skills add https://github.com/antonyfmunoz/OS --skill python-antonyfmunoz

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Maintains reliable, EOS-compatible Python development by preventing common integration mistakes around imports, environment variables, async behavior, and database access.

Core Features & Use Cases

  • Correct EOS sys.path and namespace packaging: Keeps eos_ai imports working by enforcing the required repo-root insertion and the implicit namespace rule (no __init__.py in eos_ai/).
  • Safe environment and credential handling: Standardizes .env loading across eos_ai/ vs services/ and ensures API keys and DATABASE_URL are accessed via environment variables with sanitized error messages.
  • Production-grade async and database patterns: Guides correct asyncio.to_thread() usage for Discord bot contexts and enforces psycopg2 get_conn() context-manager semantics for RLS and transactions.

Quick Start

Ask the AI: "Show me how to add a new async function in the Discord bot that calls an EOS gateway method without blocking the event loop, and ensure it loads the correct .env files and uses get_conn() for any Neon queries."

Frequently Asked Questions about python

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix eos_ai import failures caused by missing namespace packages?

To fix eos_ai import failures, insert the repo-root directory into sys.path before importing eos_ai modules and ensure the eos_ai/ directory uses implicit namespace packaging without an __init__.py file.

How do I run psycopg2 database queries safely with Neon PostgreSQL and RLS?

Run Neon PostgreSQL queries safely by using the psycopg2 get_conn() context-manager, which handles connections, manages Row Level Security (RLS), and secures transactions automatically.

What's the best way to prevent blocking the event loop in a Discord voice bot?

Prevent Discord bot event loop blocking by offloading blocking operations to background threads using the asyncio.to_thread() pattern, keeping your async functions non-blocking.

How do I load environment variables correctly across different project scopes?

Load environment variables correctly by standardizing dotenv loading for eos_ai/ versus services/ scopes, ensuring API keys and DATABASE_URL are accessed via environment variables with sanitized errors.

Why does my Python script fail when calling an EOS gateway method asynchronously?

Python scripts fail when calling EOS gateway methods if dotenv is loaded from the wrong scope or if blocking calls bypass asyncio.to_thread(), disrupting non-blocking async patterns.

Do I need to use __init__.py files in my eos_ai directory structure?

No, you must not use __init__.py files in the eos_ai directory, because the structure relies on implicit namespace packages to maintain correct imports and prevent failures.