{"library":"nocodb-simple-client","title":"NocoDB Simple Client","description":"A simple and powerful Python client for the NocoDB REST API, allowing interaction with NocoDB projects, tables, and records. It handles API authentication and provides a Pythonic interface for CRUD operations. The current version is 1.3.2, and it follows NocoDB's API changes with new releases.","language":"python","status":"active","last_verified":"Thu Apr 16","install":{"commands":["pip install nocodb-simple-client"],"cli":null},"imports":["from nocodb_simple_client import NocoDBClient"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import os\nfrom nocodb_simple_client import NocoDBClient\n\n# It is recommended to use environment variables for sensitive data\nBASE_URL = os.environ.get(\"NOCODB_BASE_URL\", \"http://localhost:8080\")\nAUTH_TOKEN = os.environ.get(\"NOCODB_AUTH_TOKEN\", \"YOUR_AUTH_TOKEN_HERE\") # X-NocoDB-Auth token\nPROJECT_ID = os.environ.get(\"NOCODB_PROJECT_ID\", \"p00000000000000000000000000\") # Replace with your actual Project ID\n\ntry:\n    client = NocoDBClient(\n        base_url=BASE_URL,\n        auth_token=AUTH_TOKEN,\n        project_id=PROJECT_ID\n    )\n\n    # Example: List all tables in the project\n    # This requires the AUTH_TOKEN and PROJECT_ID to be valid.\n    tables_response = client.tables.list()\n    print(f\"Tables in project: {[t['title'] for t in tables_response.get('list', [])]}\")\n\n    # Example: Get records from a specific table\n    # Replace 'MyTable' with an actual table name from your NocoDB project\n    TABLE_NAME = os.environ.get(\"NOCODB_EXAMPLE_TABLE\", \"TestTable\")\n    print(f\"\\nAttempting to fetch records from table: {TABLE_NAME}\")\n    records = client.tables.get_all(TABLE_NAME)\n    print(f\"First 3 records from {TABLE_NAME}: {records[:3]}\")\n\nexcept Exception as e:\n    print(f\"An error occurred: {e}\")\n    print(\"Please ensure NOCODB_BASE_URL, NOCODB_AUTH_TOKEN, and NOCODB_PROJECT_ID are correctly set.\")\n    print(\"Also verify the NOCODB_EXAMPLE_TABLE exists and is accessible by the provided token.\")","lang":"python","description":"Initializes the NocoDB client using environment variables for sensitive details, then lists tables and fetches records from an example table. This helps verify basic connectivity and authentication.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}