Welcome to the TuringDB Examples repository! This collection provides practical examples and tutorials for using TuringDB in real-world scenarios.
- Python 3.13 or higher
- uv package manager
-
Clone the repository:
git clone https://github.com/turing-db/turingdb-examples.git cd turingdb-examples -
Install dependencies:
uv sync
-
Start Jupyter Lab:
bash run_jupyter.sh
This will start the Jupyter server on port 8889 (no token required). Open your web browser and go to:
http://localhost:8889/lab -
Open and run the example notebooks in
examples/notebooks/public_version/
Located in examples/notebooks/public_version/:
- London Transport Analysis (
london_transport_TfL.ipynb): Demonstrates TuringDB usage with real Transport for London data - Complete datasets included in the
data/folder
All examples work seamlessly with popular AI providers and include everything needed for data analysis and AI integration.
- Run a notebook: Navigate to any
.ipynbfile in Jupyter Lab and run the cells - Modify examples: Feel free to experiment with the code and data
- Add your own data: Replace or add datasets in the
data/folders
Some examples may require API keys for AI services. To set them up:
-
Create a
.envfile in the project root directory (same level aspyproject.toml):touch .env
-
Add your API keys to the
.envfile using any text editor:# Open with your preferred editor (nano, vim, code, etc.) nano .env -
Add the following content (replace with your actual keys):
# Optional: Add your API keys if needed by specific examples ANTHROPIC_API_KEY=your_anthropic_key_here OPENAI_API_KEY=your_openai_key_here MISTRAL_API_KEY=your_mistral_key_here
-
Save and close the file. The
.envfile is automatically ignored by git for security.
The repository includes real datasets:
- Transport for London (TfL): Tube station data, routes, and sightseeing information
- All data files are located in
examples/notebooks/public_version/data/
All dependencies are automatically managed and installed when you run uv sync. No manual package installation needed!
Import errors: Make sure you've run uv sync to install all dependencies
Jupyter not starting: Ensure you're using bash run_jupyter.sh and not a system-wide jupyter installation
Missing data files: Verify that CSV files exist in examples/notebooks/public_version/data/
API errors: Check that any required API keys are properly set in your .env file
- Check the TuringDB documentation
Ready to dive into AI-powered data analysis? Open those notebooks and discover what TuringDB can do for you! 🎯✨