Skip to main content

PodTech's Tabichan API SDK

Project description

Tabichan Python SDK

Tests PyPI version Python License

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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for your changes
  5. Run the test suite
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tabichan_python_sdk-0.1.0.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tabichan_python_sdk-0.1.0-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

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

Hashes for tabichan_python_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d70c050d80c2a5652766c83cc59809eed62234597283cc48f8033b8a8206d333
MD5 b9dc71be97f39390e5dcabad2d07ed9e
BLAKE2b-256 42b4608ab2998afdc012e4bfe66b09c64a7513dbb33d4df8ebcad553217cd682

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tabichan_python_sdk-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for tabichan_python_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 425c677a74cb8b36ca30e63854f45f13b98545ca1b79d811791131abb56222e0
MD5 9a0bbb68c5f75ffb968795ec3542046e
BLAKE2b-256 9903e19b66cafa894d594b59854403cc93aafcff6b5c442b004cf1def8dde094

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page