Installation Guide
This guide will walk you through the process of installing and configuring the Teable Client Library.
System Requirements
Before installing the Teable Client Library, ensure your system meets these requirements:
- Python 3.7 or higher
- pip (Python package installer)
- Access to a Teable instance
- Teable API key
- For advanced operations: Teable account credentials
Installation Methods
1. Using pip (Recommended)
The simplest way to install the Teable Client Library is using pip:
2. Installing from Source
For the latest development version, you can install directly from the source:
Environment Setup
1. API Key Configuration
You'll need a Teable API key to use the library. There are several ways to configure it:
Option 1: Environment Variables
Create a .env
file in your project root:
TEABLE_API_KEY=your_api_key_here
TEABLE_API_URL=https://api.teable.io # Optional, defaults to this value
Then in your code:
Option 2: Direct Configuration
from teable import TeableClient, TeableConfig
config = TeableConfig(
api_key="your_api_key_here",
api_url="https://api.teable.io" # Optional
)
client = TeableClient(config)
2. Authentication Setup
For operations requiring full access (like space management), you'll need to authenticate:
# After client initialization
client.auth.signin(
email="your-email@example.com",
password="your-password"
)
Verification
To verify your installation and configuration:
from teable import TeableClient, TeableConfig
# Initialize client
config = TeableConfig(
api_key="your_api_key_here"
)
client = TeableClient(config)
# Test authentication
try:
# Sign in (required for full access)
client.auth.signin(
email="your-email@example.com",
password="your-password"
)
print("Authentication successful!")
# Test API access
spaces = client.spaces.get_spaces()
print(f"Found {len(spaces)} spaces")
except Exception as e:
print(f"Setup verification failed: {str(e)}")
Development Installation
If you're planning to contribute to the library or need to run tests:
-
Clone the repository:
-
Install development dependencies:
-
Set up test environment: Create a
.env
file in thetests
directory: -
Run tests:
Troubleshooting
Common Issues
- ImportError: No module named 'teable'
- Verify the installation:
pip list | grep teable
-
Try reinstalling:
pip install --force-reinstall teable-client
-
Authentication Errors
- Verify your API key is correct
- Check if your account credentials are valid
-
Ensure you're using the correct API URL
-
Permission Errors
- Verify you've signed in for operations requiring authentication
- Check your account has the necessary permissions
Getting Help
If you encounter issues:
- Check the error handling documentation
- Review the API Reference
- Search existing GitHub issues
- Create a new issue with:
- Python version
- Library version
- Error message
- Minimal code example
Next Steps
Once you've completed the installation:
- Follow the Quickstart Guide
- Review Best Practices
- Explore the API Reference