PodTech's Tabichan API SDK
Project description
Tabichan Python SDK
PodTech's Tabichan API SDK for Python - Your AI-powered tourism assistant.
Features
- 🗾 Support for Japan and France tourism queries
- 🔄 Asynchronous chat processing with polling
- 🖼️ Image thumbnails for tourism content
- 🌍 Multi-language support
- 🔒 Secure API key authentication
Installation
pip install tabichan-python-sdk
Quick Start
Environment Setup
Set your API key as an environment variable:
export TABICHAN_API_KEY="your-api-key-here"
Basic Usage
import os
from tabichan import TabichanClient
# Initialize client with API key from environment
api_key = os.getenv("TABICHAN_API_KEY")
client = TabichanClient(api_key)
# Start a chat about Japan tourism
task_id = client.start_chat(
user_query="What are the best temples to visit in Kyoto?",
user_id="user123",
country="japan"
)
# Wait for the response
result = client.wait_for_chat(task_id, verbose=True)
print(result)
Advanced Usage
import os
from tabichan import TabichanClient
api_key = os.getenv("TABICHAN_API_KEY")
client = TabichanClient(api_key)
# Start a chat with history and additional inputs
task_id = client.start_chat(
user_query="Tell me about romantic places in Paris",
user_id="user456",
country="france",
history=[
{"role": "user", "content": "Hello"},
{"role": "assistant", "content": "Hello! How can I help you with your travel plans?"}
],
additional_inputs={"budget": "mid-range", "duration": "3 days"}
)
# Poll for status manually
status_data = client.poll_chat(task_id)
print(f"Status: {status_data['status']}")
# Wait for completion
result = client.wait_for_chat(task_id)
# Get related image if available
image_id = result["itinerary"]["days"][0]["activities"][0]["activity"]["id"]
image_base64 = client.get_image(image_id, country="france")
print(f"Generated image: {len(image_base64)} characters")
API Reference
TabichanClient
__init__(api_key: str)
Initialize the client with your API key.
start_chat(user_query: str, user_id: str, country: Literal["japan", "france"] = "japan", history: list[dict] = None, additional_inputs: dict = None) -> str
Start a new chat session and return a task ID.
poll_chat(task_id: str) -> dict
Poll the status of a chat task.
wait_for_chat(task_id: str, verbose: bool = False) -> dict
Wait for a chat task to complete and return the result.
get_image(id: str, country: Literal["japan", "france"] = "japan") -> str
Get a base64-encoded image by ID.
Development
Setup
git clone https://github.com/Podtech-AI/tabichan-python-sdk.git
cd tabichan-python-sdk
uv sync --dev"
Running Tests
uv run pytest
Linting
uv run ruff format
Contributing
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for your changes
- Run the test suite
- Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
For support, please contact us at maxence@podtech.tech or open an issue on GitHub.
Made with ❤️ by PodTech AI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tabichan_python_sdk-0.1.0.tar.gz.
File metadata
- Download URL: tabichan_python_sdk-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d70c050d80c2a5652766c83cc59809eed62234597283cc48f8033b8a8206d333
|
|
| MD5 |
b9dc71be97f39390e5dcabad2d07ed9e
|
|
| BLAKE2b-256 |
42b4608ab2998afdc012e4bfe66b09c64a7513dbb33d4df8ebcad553217cd682
|
Provenance
The following attestation bundles were made for tabichan_python_sdk-0.1.0.tar.gz:
Publisher:
publish.yml on Podtech-AI/tabichan-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tabichan_python_sdk-0.1.0.tar.gz -
Subject digest:
d70c050d80c2a5652766c83cc59809eed62234597283cc48f8033b8a8206d333 - Sigstore transparency entry: 307740476
- Sigstore integration time:
-
Permalink:
Podtech-AI/tabichan-python-sdk@265c8c638f12ca30ad8f92129adc20498d67f245 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/Podtech-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@265c8c638f12ca30ad8f92129adc20498d67f245 -
Trigger Event:
release
-
Statement type:
File details
Details for the file tabichan_python_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tabichan_python_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425c677a74cb8b36ca30e63854f45f13b98545ca1b79d811791131abb56222e0
|
|
| MD5 |
9a0bbb68c5f75ffb968795ec3542046e
|
|
| BLAKE2b-256 |
9903e19b66cafa894d594b59854403cc93aafcff6b5c442b004cf1def8dde094
|
Provenance
The following attestation bundles were made for tabichan_python_sdk-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Podtech-AI/tabichan-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tabichan_python_sdk-0.1.0-py3-none-any.whl -
Subject digest:
425c677a74cb8b36ca30e63854f45f13b98545ca1b79d811791131abb56222e0 - Sigstore transparency entry: 307740484
- Sigstore integration time:
-
Permalink:
Podtech-AI/tabichan-python-sdk@265c8c638f12ca30ad8f92129adc20498d67f245 -
Branch / Tag:
refs/tags/0.1.0 - Owner: https://github.com/Podtech-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@265c8c638f12ca30ad8f92129adc20498d67f245 -
Trigger Event:
release
-
Statement type: